Saturday , December 9 2023

Oracle Database Startup and Shutdown Modes


In this article, I will explain the startup and shutdown modes of Oracle database.

Oracle Database Startup Modes

A closed Oracle database opens in 3 stages. The best summarizing image is as follows. We will review these steps one by one.

Startup modes

Nomount Mode: The instance and background processes start when we open the Oracle database in Nomount mode. Oracle reads the parameter files (spfile or pfile) in this step. In this mode, the database is closed to other users. Only instance and background processes are open.

Mount Mode: The Control file opens in this step. When the database opens and reads control file, it will know where the datafiles and archive files are. However, in this step, users still cannot access the database. Only system views and performance views are accessible.

We can mount a database in Nomount mode as follows.

Or we can mount a closed database directly as follows.

Open Mode: In this mode, the database opens normally and can be accessed by other users. We can start a closed database directly in Open mode as follows.

Even if we open a closed database directly in open mode, the above operations take place in the background. That is, the database is first opened in nomount mode, then brought to mount mode, and then opened. This happens very quickly.

We can bring a database in Mount mode to Open mode as follows.

Oracle Database Shutdown Modes

Oracle offers us 5 different methods for shutting down the database. As each method has different functions, we will examine they separately below.

Shutdown immediate: This method is the most preferred method. Because the database is closed in a healthy and consistent way. When this command is executed, oracle rollbacks uncommitted transactions and executes the shutdown procedures. The use of the command is as follows.

Shutdown Normal: This method is not preferred, but sometimes it may be needed. When we try to close the database with this method, Oracle waits all users connected to the database to finish their jobs and close their sessions. The database will not close even if a single session is open. The use of the command is as follows.

Shutdown Transactional: In this method, Oracle waits all users to commit their transactions. After the Commit process is complete, Oracle kills that session and continue to shutdown process. This method has zero data loss guarantee. The use of the command is as follows.

Shutdown abort: This method is like unplugging the database. All transactions are suddenly stopped and the database is closed inconsistently. Although this method is not preferred, it is sometimes very necessary. For example, you are doing a very critical operation and time is very important for you and you need to close or restart the database. If it will take too long to shutdown the database in a consistent manner, this method can be used. The use of the command is as follows.

In addition, there is a force restart command. Lastly, I will explain this command.

Startup Force: This command runs the Shutdown abort + Startup command in the background. So with Shutdown abort, the database is suddenly closed, and then startup and the database are opened in a normal format. The use of the command is as follows.



About Mehmet Salih DEVECİ

Leave a Reply

Your email address will not be published. Required fields are marked *