In Oracle, a “shutdown” refers to the process of stopping the Oracle Database instance. There are several types of shutdowns available, depending on the purpose and the level of activity in the database. Here are the common types of shutdowns in Oracle:
1. Shutdown Normal
This is the regular and graceful way to shut down the Oracle Database. When you issue a normal shutdown command, Oracle waits for all active sessions and transactions to complete or roll back before closing the database.
The syntax for a normal shutdown is:
SHUTDOWN [IMMEDIATE | TRANSACTIONAL | NORMAL]
- IMMEDIATE: Terminates all user sessions and rolls back any active transactions. No new connections are allowed. This option is the fastest way to shut down the database but might lead to transaction recovery when the database is started again.
- TRANSACTIONAL: Waits for all current transactions to complete before shutting down. New connections are not allowed during this time.
- NORMAL: This is the default option. It waits for all active sessions to end normally before shutting down. It is similar to TRANSACTIONAL but allows new connections until it is time to shut down.
2. Shutdown Abort
This is an emergency shutdown. When you execute a “shutdown abort” command, Oracle immediately terminates the instance without any concern for active transactions. This type of shutdown does not perform a clean shutdown and can result in instance recovery and crash recovery when the database is started again. It should be used only when absolutely necessary, as it may cause data inconsistency.
3. Shutdown Immediate
As mentioned earlier, this is one of the options available in a normal shutdown. However, it can also be used as a standalone command. When you execute “shutdown immediate,” Oracle waits for all active transactions to complete and then shuts down the database, preventing new connections.
4. Shutdown Transactional
This type of shutdown is also available within the “shutdown” command, as mentioned earlier. However, it can be used as a standalone command as well. When you execute “shutdown transactional,” Oracle waits for all current transactions to complete before shutting down the database.
Please note that to execute shutdown commands in Oracle, you typically need administrator privileges or the SYSDBA privilege. Always ensure you have a valid reason for shutting down the database, and use the appropriate shutdown type to match the scenario and requirements.
Pingback: RAC Database Shutdown Procedure - Info Influx