DatabaseOracle

What happens during shutdown Oracle database

In this tutorial, we explain – what happens during shutdown Oracle database.

Shutdown brings down the running instance of Oracle database gracefully or abruptly.

There are 4 modes of shutdown the database in Oracle.What happens during shutdown Oracle database

  • Shutdown Normal
  • Shutdown Transactional
  • Shutdown Immediate
  • Shutdown Abort

1)What happens when we type shutdown normal on Oracle DB

  • The moment shutdown command is typed, no new user can connect and establish a new connection.
  • Oracle waits for all the connected users to disconnect the on their own.
  • Once the last user disconnects, Oracle proceeds for graceful shutdown.
  • In the process of graceful shutdown, it performs a checkpoint, flushes redo log buffer and database buffer cache.
  • It writes checkpoint information in datafile header and control file.
  • Closes all datafiles, temporary files, and redo log files.
  • Now Oracle dismounts the Oracle database instance by closing the control file. You are now at dismount stage.
  • At last, it kills all background processes and releases the memory.

The command to shut down the database with the normal mode is as below-

2) What happens when we type Shutdown Transactional on Oracle DB

  • The moment shutdown command is typed, no new user can connect and establish a new connection.
  • Oracle waits to finish all running transactions.
  • Once the last running transaction is over, Oracle proceeds for graceful shutdown.
  • In the process of graceful shutdown, it performs a checkpoint, flushes redo log buffer and database buffer cache.
  • It writes checkpoint information in datafile header and control file.
  • Closes all open data files, temporary files, and redo log files.
  • Now Oracle dismounts the database instance by closing the control file. You are now at dismount stage.
  • At last, it kills all background processes and releases the memory.

The command to shut down the database with the transactional model is as below-

3) What happens when we type Shutdown Immediate on Oracle DB

  • The moment shutdown command is typed, no new user can connect and establish a new connection.
  • Oracle directly starts aborting all the running transactions followed by the rollback.
  • Once the last transaction is over, Oracle proceeds for the graceful shutdown.
  • In the process of the graceful shutdown, it performs a checkpoint, flushes redo log buffer and
  • database buffer cache.
  • It writes checkpoint information in datafile header and control file.
  • Closes all open data files, temporary files, and redo log files.
  • Now Oracle dismounts the database instance by closing the control file. You are now at dismount stage.
  • At last, it kills all background processes and releases the memory.

The command to shut down the database with immediate mode is as below-

4) What happens when we type Shutdown Abort on Oracle DB

  • The moment shutdown command is typed, no new user can connect and establish a new connection. In this mode, Oracle directly starts to release memory and kills all the background processes.
  • Since Oracle has not performed checkpoint operation while shutting down the database, it required to perform instance/crash recovery of the database at the next startup.
  • Whenever next time you will start this instance While going from mount to open  SMON identifies that the last shutdown was not a graceful one. So it starts two-phase recovery for your database
  • Now Oracle starts the ROLL FORWARD, it this phase Oracle applies all redo entries from last checkpoint position.
  • At the end of ROLL BACKWARD, it opens the database for normal users. Now it starts performing the roll backward phase of the instance/crash recovery.

The command to shut down the database with abort mode is as below-

Related Articles

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close

Adblock Detected

Please consider supporting us by disabling your ad blocker