Talk about the shutdown of the Oracle database

Source: Internet
Author: User
Tags sessions

Earlier, the Oracle database was started, and today the Oracle database is shut down.
I. Three phases of database shutdownThe Oracle database startup process consists of three steps: Nomount, MOUNT-and OPEN, the shutdown of the database is actually three steps: CLOSE, Dismount-> SHUTDOWN。sql> SHUTDOWN; Database closed.
Database dismounted.
ORACLE instance shut down.

You can also switch off from the startup state, in the order of close, dismount-> shutdown.1. Database ShutdownCommand:Sql> ALTER DATABASE close;

Database altered.

elapsed:00:00:02.20Alert log:sat-11:48:35
ALTER DATABASE close
Warning:alter database Close is not a PU blicly supported command.
Sat 11:48:35
Stopping background process CJQ0
Sat Nov 11:48:35
Smon:disabling TX Recover Y
Stopping background process QMNC
All dispatchers and shared servers shutdown
Close:killing server sessions. close:all Sessions shutdown successfully.
smon:disabling Cache Recovery
Sat 11:48:37
Shutting archive processes
Archiving is disabled
Sat 11:48:37
Arch shutting down
Arc3:archival stopped
Sat (11:48:37)
Arch shutting Down
Arc2:archival stopped
Sat-11:48:37
ARCH shutting down
Arc1:archival stopped
Sat 15 1 1:48:37
ARCH shutting down
Arc0:archival stopped
Thread 1 closed at log sequence 4
successful close of R Edo thread 1
Completed:alter database close

2. Database UninstallationCommand:sql> ALTER DATABASE dismount;

Database altered.

elapsed:00:00:00.05Alarm log:Sat Nov 15 11:49:40 2014
Idle dispatcher ' D000 ' terminated, PID = (17, 1)
Sat Nov 15 11:50:04 2014
ALTER DATABASE Dismount
Shutting down archive processes
Archiving is disabled
Completed:alter Database Dismount3. Close the DB instanceCommand:sql> shutdown;
Ora-01507:database not mounted

ORACLE instance shut down.
Sql>Alarm log:Sat Nov 15 11:51:22 2014
Shutting down instance (normal)
Shutting down Instance:further logons disabled
Stopping background process MMNL
Stopping background process Mmon
License High Water mark = 4
All dispatchers and shared servers shutdown
ALTER DATABASE CLOSE NORMAL
ORA-1507 signalled During:alter DATABASE CLOSE NORMAL ...
Arch:archival disabled due to shutdown:1090
Shutting down archive processes
Archiving is disabled
Sat Nov 15 11:51:25 2014
Stopping background process Vktm
Arch:archival disabled due to shutdown:1090
Shutting down archive processes
Archiving is disabled
Sat Nov 15 11:51:27 2014
Instance Shutdown Complete
ii. four options for database shutdown

1. SHUTDOWN NORMAL
This is the default option for the database shutdown shutdown command. That is to say, if you issue shutdown such an order, that is shutdown nornal meaning.
When this command is issued, any new connections will no longer be allowed to connect to the database. Before the database shuts down, Oracle waits for all users who are currently connected to exit from the database before shutting down the database. By shutting down the database in this way, no instance recovery is required at the next boot. However, because the normal mode to wait for all users to disconnect before shutting down the database, all wait time may be very long; in a production environment, this approach can hardly close a database with a large number of user connections, so it is rarely used.

2, SHUTDOWN IMMEDIATE
This is the most common way to shut down a database, when using this command, the transaction that is currently being processed by Oracle is immediately interrupted, the uncommitted transactions are rolled back, and the system does not wait for the user connecting to the database to exit, forcing all connected users to be disconnected. The checkpoint is then executed, all the change data is written back to the data file, and the database is closed. Using this method to shut down the database is a secure way to shut down the database when the next time you start the database without an instance recovery.note, however, that if the database system is busy and a large number of transactions are currently executing, it may also take a significant amount of time to close the database with this option.

3, SHUTDOWN transactional
This option is only available after Oracle 8i. This command is commonly used to schedule a shutdown of the database, which causes the current connection to the system to execute and the active transaction is completed, and any new connections and transactions are disallowed after the command is run. After all active transactions are complete, the database shuts down the database in the same way as shutdown immediate.

4, SHUTDOWN ABORT
The least recommended way to use database shutdown, using this option, the database immediately terminates all user connections, interrupts all transactions, shuts down the database, shuts down the database in this way, does not complete the transaction is not rolled back, the database does not perform checkpoints, so the next time you start the city, the database must perform an instance recovery, and instance recovery can take a significant amount of time. Database startup can therefore take a long time to wait. Abort mode shuts down the database, similar to a sudden power outage of the database serverMay cause inconsistencies, so it's easy not to shut down the database this way unless you have to.


Reference:Talking about the start of Oracle database Remote DBA team-oracle database Startup & Shutdown Process




Talk about the shutdown of the Oracle database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.