Thursday, July 3, 2008

Startup nomount

- Read the Parameter file and start the instance (allocate memory/SGA and start background processes)

- NOTE: SELECT STATUS FROM V$INSTANCE; this will show a status of STARTED

Startup mount

- Read the Parameter file and start the instance (allocate memory/SGA and start background processes)

- Read the controlfile(s)

- NOTE: SELECT STATUS FROM V$INSTANCE; this will show a status of MOUNTED

Status = OPEN means the database is open and available.

Instance Modes:

SHUTDOWN

- Only superuser can connect

- This is where you issue STARTUP command

- Instance is down, V$INSTANCE is not available

NOMOUNT

-- Only superuser can connect

-- Parameter file is read and the Instance started (memory/SGA allocated and background processes started)

-- SELECT status FROM v$instance; will show STARTED

-- from here you can issue:

- CREATE DATABASE (if database does not exist)

- CREATE CONTROLFILE (if you are recreating a controlfile)

- ALTER DATABASE MOUNT (if you want to go into MOUNT MODE) MOUNT

-- Only superuser can connect

-- This is when all the control files are read and verified to be to same

-- SELECT status FROM v$instance; will show MOUNTED

-- In order to get into mount mode, it will go into nomount mode first

-- from here you can issue:

- RECOVER commands (if you are performing closed db recovery)

- ALTER DATABASE ARCHIVELOG/NOARCHIVELOG;

- ALTER DATABASE OPEN; (to make datatabase available to regular

users)

- SHUTDOWN (if you want to close the instance) OPEN

-- Any user with CREATE SESSION privilege can now connect

-- User data is now available

-- Before the db actually opens, Oracle will check all the datafiles and redo logs to make sure they are in sync

-- SELECT status FROM v$instance; will show OPEN

-- In order to get into open mode, it will go into nomount mode first and then mount mode.

The only reason you STARTUP NOMOUNT or STARTUP MOUNT is if you have work to do, such as creating the database or recovering the database. If no work, people generally just do STARTUP which will start the instance (nomount

mode) then read the controlfiles (mount mode) and then read the datafiles (open).

No comments: