In this article, we will discuss different Oracle database shutdown modes.
Please note that to startup or shutdown the database, you need to logon as “sys as sysdba” or with any user who has sysdba role.
Oracle database shutdown Options
1. Shutdown/shut normal:
This is the default shutdown mode. During this state, the Oracle waits for all the currently connected users to disconnect from the database and then shuts down the database.
- Idle sessions will not disconnected
- No new connections are allowed
- Connected users can perform ongoing transactions
- Force a checkpoint (A common SCN number will be updated to controlfiles and datafiles) before the database shutdown
- It is a graceful shutdown, So it does not require instance recovery in the next startup
SHUTDOWN NORMAL;
2. Shutdown Transnational:
During this state, oracle waits until all the transactions are completed(commit/rollback) and then shuts down the database.
- Idle sessions will be disconnected
- No new connections are allowed
- Connected users can perform ongoing transactions. Users can not start a new transaction on this instance. If users attempt to start a new transaction, they are disconnected
- After all transactions have been completed, any client still connected to the instance is disconnected
- Force a checkpoint (A common SCN number will be updated to controlfiles and datafiles) before the database shutdown
- It is a graceful shutdown, So it does not require instance recovery in the next startup
SHUTDOWN TRANSACTIONAL;
3. Shutdown immediate:
This method is the most preferred. During this state, the oracle will disconnect all the sessions; roll back all the running transactions(uncommitted), and shut down the database.
- Idle sessions will be disconnected
- No new connections are allowed
- Connected users can not perform ongoing transactions
- Force a checkpoint (A common SCN number will be updated to controlfiles and datafiles) before the database shutdown
- It is a graceful shutdown, So it does not require instance recovery in the next startup
SHUTDOWN IMMEDIATE;
4. Shutdown Abort:
During this state, Oracle doesn’t roll back any transactions and simply brings down the database abruptly(NO Commit /No Rollback)
- Idle sessions will be disconnected
- No new connections are allowed
- Connected users can not perform ongoing transactions.
- Checkpoint (A common SCN number will be updated to controlfiles and datafiles) will not happen before the database shutdown
- It is an abrupt shutdown, So it requires instance recovery in the next startup
SHUTDOWN ABORT;
Any backup taken after shutting down the database in abort mode will not be consistent. It’s always recommended to use the first three methods to shut down the database for a consistent backup.
Hope this Oracle database shutdown command will help you to differentiate between these 4 oracle database shutdown options. Explore related topics on our site to deepen your understanding like Oracle database startup Modes.
If you need more info on this, you can go through the Oracle doc Starting Up and Shutting Down.