About Oracle Database shutdown and Oracle Database Shutdown

Source: Internet
Author: User

About Oracle Database shutdown and Oracle Database Shutdown

I have talked about Oracle Database startup before. Let's talk about Oracle Database shutdown today.
I. Three Phases of database ShutdownThe Oracle Database startup process involves three steps: NOMOUNT-> MOUNT-> OPEN. The database SHUTDOWN actually involves three steps: CLOSE-> DISMOUNT-> SHUTDOWN. SQL> SHUTDOWN; Database closed.
Database dismounted.
ORACLE instance shut down.

You can also CLOSE the instance in the STARTUP status in the order of CLOSE-> DISMOUNT-> SHUTDOWN. 1. database close command: SQL> alter database close;

Database altered.

Elapsed: 00:00:02. 20 alarm Log (Alert Log): Sat Nov 15 11:48:35 2014
Alter database close
Warning: alter database close is not a publicly supported command.
Sat Nov 15 11:48:35 2014
Stopping background process CJQ0
Sat Nov 15 11:48:35 2014
SMON: disabling tx recovery
Stopping background process QMNC
All dispatchers and shared servers shutdown
CLOSE: killing server sessions.
CLOSE: all sessions shutdown successfully.
SMON: disabling cache recovery
Sat Nov 15 11:48:37 2014
Shutting down archive processes
Archiving is disabled
Sat Nov 15 11:48:37 2014
ARCH shutting down
ARC3: Archival stopped
Sat Nov 15 11:48:37 2014
ARCH shutting down
ARC2: Archival stopped
Sat Nov 15 11:48:37 2014
ARCH shutting down
ARC1: Archival stopped
Sat Nov 15 11:48:37 2014
ARCH shutting down
ARC0: Archival stopped
Thread 1 closed at log sequence 4
Successful close of redo thread 1
Completed: alter database close
2. database unmount command: SQL> alter database dismount;

Database altered.

Elapsed: 00:00:00. 05 alarm 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, shut down database instance command: 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...
Archival disabled due to shutdown: 1090
Shutting down archive processes
Archiving is disabled
Sat Nov 15 11:51:25 2014
Stopping background process VKTM
Archival disabled due to shutdown: 1090
Shutting down archive processes
Archiving is disabled
Sat Nov 15 11:51:27 2014
Instance shutdown complete
2. Four options for database Shutdown

1. SHUTDOWN NORMAL
This is the default option for shutting down the SHUTDOWN command of the database. That is to say, if you issue a command like SHUTDOWN, it means shutdown nornal.
After this command is issued, no new connections are allowed to connect to the database. Before the database is closed, Oracle will close the database only after all currently connected users exit from the database. Close the database in this way, and no instance recovery is required at the next startup. However, in Normal mode, the database can be closed only after all users are disconnected. The waiting time may be too long; In the production environment, this method is rarely used to close databases with a large number of user connections.

2. SHUTDOWN IMMEDIATE
This is the most common way to close a database.When you use this command, the transaction being processed by Oracle is immediately interrupted, and uncommitted transactions are rolled back. The system does not wait for the user connected to the database to exit, force disconnect all connected users. Then run the Check Point to write all the changed data back to the data file and close the database. You can use this method to shut down the database. You do not need to restore the database instance the next time you start the database. This is a safe way to shut down the database. However, if the database system is busy and a large number of transactions are being executed, it may take a lot of time to use this option to close the database.

3. SHUTDOWN TRANSACTIONAL
This option is only available after Oracle 8i. This command is often used to plan to close the database. It completes the execution of the active transaction that is currently connected to the system. After running this command, any new connections and transactions are not allowed. After all the active transactions are completed, the database will be shut down in the same way as shutdown immediate.

4. SHUTDOWN ABORT
The least recommended database shutdown MethodWith this option, the database will immediately terminate all user connections, interrupt all transactions, and shut down the database. In this way, the database will not be rolled back and the database will not execute checkpoints, so the next time you start the city, the database must restore the instance. It may take a lot of time to recover the instance, and it may take a long time to start the database. The ABORT method is similar to the database server's sudden power failure., May cause inconsistency, so do not close the database easily unless you have.


Refer:About starting the Remote DBA team of Oracle Database-Oracle Database Startup & Shutdown Process




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.