In today’s article, I will explain the Abort, Normal, Immediate, Transactional and Startup Force commands to close the oracle database.
Shutdown Abort:
1. It is used when the database cannot be closed with normal or transactional methods.
2. The database is shut down abruptly.
3. Executed transactions are terminated and cannot be rolled back.
4. The database becomes inconsistent.
5. While the database is opening, SMON is activated at the NOMOUNT step and the instance is recovered by reading the online redo log files.
6. If the database cannot be closed with this method, the SMON process is killed and the database is closed.
1 | [root@DBONUR ~]# ps -ef | grep smon |
7. Command:
1 | SQL> shutdown abort; |
Shutdown Normal:
1. It waits for the users connected to the database to finish their transactions and terminate their database sessions.
2. For this reason, it is not preferred much.
3. Command:
1 | SQL> shutdown normal; |
Shutdown Immediate:
1. Transactions that have not been committed until that time are rolled back and the database is closed.
2. Command:
1 | SQL> shutdown immediate; |
Shutdown Transactional:
1. The database is shut down with zero data loss.
2. The database will not be closed until the changes made by the users are guaranteed by commit.
3. Command:
1 | SQL> shutdown transactional; |
Startup Force:
This command is like the following commands running one after the other.
1 2 | SQL> shutdown abort; SQL> startup; |