This video presents the four different modes for shutting down the Oracle database and describe the differences between them.
- [Instructor] We have a similar story for shutting down the Oracle Instance. Going from a running database state to a ... Well, not running. We have several methods or modes of database shutdown you can use. These different modes determine how cleanly is the database shutdown procedure performed, compared to the time it will take. Starting off with the SHUTDOWN ABORT command. If we run the SHUTDOWN ABORT command, it will take the Oracle database from an open, or on state, to an off state immediately.
However, because of its brute-force nature, the database will not be consistent upon shut down. And when you will restart the database, Oracle will have to use the redo log files to perform automatic crash recovery. It is similar to pulling the plug of the Oracle database. That might sound scary, but as long as you don't have any corruptions in your database data files or missing redo logs, you should be okay. The SHUTDOWN ABORT mode is usually used when there is no other method of shutting down the instance that works.
The next shutdown mode we have is the SHUTDOWN IMMEDIATE mode. If you run this command in your Oracle SQL prompt, Oracle will terminate all open user sessions. Wait until any non-committed transaction has been rolled back and then shutdown the database while it is maintaining a consistent state. It's a slower shutdown method than SHUTDOWN ABORT, but much safer. The database will perform a check-point before shutting down the instance. However, from the user's perspective, their sessions will get abruptly terminated and any unsaved data or transactions will be lost.
The next mode of database shutdown is called SHUTDOWN TRANSACTIONAL. When typing this command to the Oracle SQL prompt, Oracle will wait for any existing transactions to finish processing and for the users to either commit or rollback the transaction before shutting down the database. However, new users or new sessions will not be able to connect. This type of shutdown can take a while as the database won't go offline until all the users have finished their work.
It is also very non-disruptive to already connected users. And the final mode of database shutdown is called SHUTDOWN NORMAL which means that Oracle will wait for all connected users or session to disconnect from the database before shutting it down. This is the slowest shutdown option, but will be completely non-intrusive to your users and your applications. So, there you have it: the four different ways to get your Oracle database from an online to an offline state.
Most database administrators use the SHUTDOWN IMMEDIATE option more often. The biggest reason is, that when shutting down the database using either SHUTDOWN IMMEDIATE, SHUTDOWN TRANSACTIONAL, or SHUTDOWN NORMAL, the database will be consistent on disc after shutdown. So, upon start-up, no recovery will have to occur. Any modified blocks from memory will be written to disc before the database goes down. That's why these modes of shutdown also take longer time.
You can call these shutdown methods as clean shutdown methods. Compare that to the SHUTDOWN ABORT option, which is a dirty shutdown method as the database instance will just terminate, abruptly. Some Oracle blocks that were modified in memory will not get the opportunity to be written to discs. So upon start-up, Oracle will have to use the redo logs to perform automatic crash recovery.
After completing this course, you'll have fundamentals required for installation, configuration, and administration of an Oracle 12c database.
- Database instance and storage
- Instance memory pools
- Instance background processes
- Client connections
- Database storage file types
- Control files and backup files
- Multitenant databases
- Starting and stopping the database
- Installing Oracle 12c software
- Using the developer tools
- Database management