Wednesday, May 6, 2015

Shutting Down the Database

Shutting Down the Database: 


Shutdown database will be done in 4 states
1. shutdown normal
2. shutdown transactional
3. shutdown immediate
4. shutdown abort.

1. Shutdown normal : 


  • No new connections are not allowed.
  • server wait till all the connected users to get disconnected before shutting down database
  • DBBC and RLB (redo log buffer ) should be written into the disk.
  • SGA memory allocation will be released
  • terminates the background process
  • database is closed and dismounted.
  • It will simply wait forever until you manually kill those sessions. Because of this, we often recommend the shutdown immediate or shutdown abort commands
  •  Here is an example of the use of the normal shutdown command. 

SQL> shutdown


2. Shutdown transactional:
 SQL> shutdown



  • No new connections are allowed
  • Existing user can’t start a new transaction.
  • Current users will be disconnected as soon the current transactions ends.
  • Shutdown process when all the transactions are completed.
  • DBBC and RLB information will be written to disk.
  • SGA memory allocation will be released and background process will be terminated.
  • Database is closed and dismounted.

3. Shutdown Immediate :

Here is an example of shutting down a database with the shutdown immediate command:
 SQL> shutdown immediate
  • No new connections are allowed
  • Users will be disconnected immediately
  • sql statements which are in process also be terminated. (Oracle will roll back the active transactions)
  • Database buffer cache and redo log information will be written to disk.
  • SGA memory allocation will be released and background process will be terminated
  • Database closed and dismounted.
4. Shutdown abort : 

A shutdown abort can be your first shutdown method of choice, since there may be times when you must force the database down. Here is an example using the shutdown abort command:

SQL> shutdown  abort 

  • Aborts all sessions, leaving current DML in need of rollback, de-allocates the SGA and terminates the background processes.
  • Note that a shutdown abort is NOT dangerous. 
  • The "abort" simply means that Oracle will terminate all active work, which is what most people want during a shutdown.

No comments:

Post a Comment

Thanks for giving comments!!