A few basic notes on Oracle Database Administration.

Sunday, February 3, 2008

Startup steps review

Do you remember what happens as an instance starts? I didn't. So, to review...

Assuming that you issue the start command in steps:

SQL> STARTUP NOMOUNT;

1 Oracle first opens and reads the initialization parameter file.

2 The memory areas associated with the database instance are allocated. Their size was specified in the parameter file. These allocated memory areas and parameters include the following:

  • SGA_TARGET parameter sets the amount of memory available to the SGA.
  • DB_CACHE_SIZE (default block size) &DB_nK_CACHE_SIZE (non-default block size)
  • SHARED_POOL_SIZE (contains the Library Cache & Data Dictionary Cache)
  • LOG_BUFFER
  • LARGE_POOL_SIZE ,
  • JAVA_POOL_SIZE, & STREAMS_POOL_SIZE
  • DB_KEEP_CACHE_SIZE & DB_RECYCLE_CACHE_SIZE

3 Oracle background processes are started. In most basic terms this includes the following Oracle background processes:

  • DBWR - Database Writer process writes dirty buffers from the database block cache to the data files.
  • CKPT - Writes checkpoint information to control files and data file headers.
  • LGWR - Log Writer process writes the log buffers out to the redo logs.
  • PMON - Process Monitor process recovers failed process resources.
  • SMON - System Monitor process recovers after instance failure and monitors temporary segments and extents.
  • ARCH - (Optional) Archive process writes filled redo logs to the archive log location(s).
  • MMON - The Oracle 10g background process to collect statistics for the Automatic Workload Repository (AWR).

Together, these processes and the associated allocated memory are called the Oracle instance. Once the instance has started successfully, the database is considered to be in the nomount stage.

SQL> alter database mount;

  1. When the startup command enters the mount stage, it opens and reads the control file.
  2. From the control file Oracle determines the location of the datafiles, but does not yet open them.

SQL> alter database open;

When Oracle opens the database, it

  1. accesses all of the datafiles associated with the database. If a file is missing it is reported.

  2. makes sure that all of the database datafiles are consistent.

And now the database is ready for use.

1 comment:

Anonymous said...

And just for completeness -
You can move data files when in "alter database mount"

Recovery happens on "alter database open"

I found your blog through Volder's. Nice to meet you.