Tuesday, March 16, 2010

How oracle start its database.

Let get into the backend scene that happen when we start an Oracle database. First assuming the system have already installed and create an Oracle Database.

Pre-requisite
  • ORACLE_HOME is defined ( normally is the Oracle DB install path)
  • ORACLE_SID is known (The Instance DB that we want to connect)

Processes
  1. Setting up the Oracle environment for the user.(Oracle DBA User, ORACLE_HOME & ORACLE_SID)
  2. Using "oracle" dba account issue >> startup [db]
  3. Oracle will lookup the spfile [$ORACLE_HOME/spfile$ORACLE_SID.ora]<-- binary file
  4. With the spfile, oracle will then create SGA (System Global Area) in the memory.
  5. All the oracle processes will also be started for the instance.(DBWR,LGWR,SMON,PMON.etc)
  6. The SGA will be assigned spaces for 
    • Fixed Buffer
    • Variable Buffer
    • DB Buffer
    • Log Buffer
  7. Next oracle will look for the control files that is mentioned in the spfile. Control files is crucial as it allow for
    • location of 'df files like datafiles','redofiles','tempfiles' & 'logfiles'
    • check global db file consistencies
    • Check if need to do any rollback
    • At the point the datafiles will be known.
  8. Database can then be mounted
  9. Next Database will then be open
  10. If the connections are from other systems or client users, we need to start the listener (LSNR) >> lsnrctl start
Basically this  are the normal steps an oracle database goes through during a database start.

No comments:

Post a Comment