What happens when you shutdown the oracle database

 What happens in Database Shutdown

$ sqlplus "/ as sysdba"

SQL>shutdown immediate

Database is closed.
Database is dismounted.
ORACLE Instance shut down.

1. Closes the Database

Oracle writes the data in the SGA ( System Global Area ) i.e shared memory to the disk.
Updates the file headers and closes the online data files and the redo log files. 
But the database will still be mounted.

2. Dismounts the Database

After the database is closed, 

Oracle Database unmounts the database to disassociate it from the instance. 
After a database is unmounted, Oracle Database closes the control files of the database. 
At this point, the instance still remains in memory.
3. Shuts down the Instance

The last step is to remove the shared memory (SGA) and terminate the background processes.
Sometimes shutdown does not cleanup the SGA or background process completely. 

This can cause error during the next startup. 

In such situation we can force a instance startup 

$ sqlplus "/as sysdba"
SQL>startup force

3 Comments

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

  1. Thank you sir, the information is very useful

    ReplyDelete
  2. sir how to find out the querry which causes the instance termination with error ORA-1092 OPTSK ABORTING PROCESS

    ReplyDelete
Previous Post Next Post