Showing posts with label Shutdown Stage Or Modes. Show all posts
Showing posts with label Shutdown Stage Or Modes. Show all posts

Monday, August 10, 2020

Oracle Database Shutdown Stages Or Mode

Hey Folks,

We will see here some basic stuff  about Oracle Database shutdown stages or modes.

Shutting Down the database :

Shut Down the database to make operating system offline backups of all physical structures and to have modified static initialization parameter take effect when restarted.

To shut down an instance, you must connect as SYSOPER or SYSDBA and use the fallowing command :

   SHUTDOWN [NORMAL | TRANSNATIONAL | IMMEDIATE | ABORT ]

    

 

SHUTDOWN OPTIONS: 

During : SHUTDOWN NORMAL or SHUTDOWN TRANSNATIONAL or SHUTDOWN IMMEDIATE 

If you use these shutdown modes options, The Database state is consistent. During the startup Process not any instance recovery required. Consistent Database is also called Clean Database. Below things happens when you use these shutdown options.

  • Database buffer cache written to the data files
  • Uncommitted changes rolled back 
  • Resources released
  • On the way to startup No any instance recovery required.

SHUTDOWN NORMAL :

Normal is the default shutdown mode. Normal database shut down proceeds with the fallowing conditions :

  • No new connections can be made.
  • The Oracle server waits for all users to disconnect before completing the shutdown.
  • Database and redo buffers are written to disk.
  • Background processes are terminated, and the SGA is removed from memory.
  • Oracle Closes and dismounts the database before shutting down the instance.
  • The next startup does not require an instance recovery.

 

SHUTDOWN TRANSNATIONAL :

A transnational shutdown prevents clients from losing work. A transnational database shutdown proceeds with the fallowing conditions :

  • No Client can start a new transaction on this particular instance 
  • A client is disconnected when the client ends the transaction that is in progress.
  • When all transactions have finished, a shut down occurs immediately.
  • The next start up does not require an instance recovery.

 

SHUTDOWN IMMEDIATE :  

Immediate database shutdown proceeds with the fallowing conditions :

  • Current SQL statements being processed by Oracle are not completed.
  • The Oracle server does not wait for the users, who are currently connected to the database, to disconnect.
  • Oracle rolls back active transactions and disconnects all connected users.
  • Oracle closes and dismounts the database before shutting down the instance.
  • The next start up does not require an instance recovery.

 

During : SHUTDOWN ABORT or Instance Failure or STARTUP FORCE :

If you use these option during shutdown, the database state is inconsistent and instance recovery is required. Inconsistent database is also called Dirty Database. Below things happens when you use these options :

On the way during shut down :

  • Modified buffers are not written to data files 
  • Uncommitted changes are not rolled back

On the way to startup :

  • Online redo log files used to re-apply changes
  • Undo segments used to roll back uncommitted changes
  • Resources released

 

SHUTDOWN ABORT :

If the NORMAL and IMMEDIATE shut down option do not work, you can abort the current database instance, Aborting an instance proceeds with the fallowing conditions :

  • Current SQL statements being processed by the Oracle server are immediately terminated.
  • Oracle does not wait for users currently connected to the database to disconnect.
  • Database and Redo buffers are not written to disk.
  • Uncommitted transactions are not rolled back.
  • The instance is terminated without closing the files.
  • The database is not closed or dismounted.
  • The next start up requires instance recovery, Which occurs immediately. 

Note : It is not advisable to backup a database that is in an inconsistent state.   

 

Thank You !!