Wednesday, February 3, 2016

Basic startup stages are:
1> startup nomount
2> startup mount
3> startup open

A part from the basic stages we also have some other option (or)  staging stages like
startup quiet
startup pfile
startup upgrade
startup downgrade
startup migrate
startup restrict
startup readonly
startup mount exclusive restrict.
------------------------------
STARTUP NOMOUNT:
------------------------------
To move to startup nomount if require parameter file.
In default location  $ORACLE_HOME/dbs
This stage is used to create a instance.
If oracle doesn't find parameter file in default location it is 

throughs an ORA-109 ERROR.
------------------------------
STARTUP MOUNT:
------------------------------
To move startup mount state we require 2 files 
parameter file and controlfile.
this stage is used to mount the database.
mounting means identifying the location of datafiles and 
Redologfiles and associating those files to the corresponding the  instance.
If don't find controlfile in default location oracle throughs an
ORA-205 ERROR.
This stage is used to perform maintain tasks.
like placing database in archivelog mode.
placing database in flashback mode
The default location of the controlfile will be decided the 
parameter DB_CREATE_FILE_DEST
then we loss controlfile to recover the controlfile we need to 
standing nomount state and repairing the controlfile also.

------------------------------
STARTUP OPEN:
------------------------------
When we say startup open oracle opens the  datafiles and 
Redologfiles.As  per the specified on controlfile.
When we loss the datafiles,Redologfiles we can perform restore
and recovery we standing in startup mount stage.
In startup open state database should be completely open for 
end user access purpose.

                                   SHUTDOWN STAGES
In different ways we can shutdown database. they are
1>shut normal
2>shut transactional
3>shut immediate
4>shut abort

------------------------
SHUT NORMAL:
--------------------------
When we issue shutnormal command oracle never down the 
database  untill and unless all users disconnected by themself.
Oracle never forces in any user to disconnect  in this case.
Before closing a database oracle performs a proper checkpoint.
once you issue shut normal command no new user is allowed 
in database.After performing the checkpoint oracle closes 
datafiles,redologfiles,controlfiles serially.

--------------------------------
SHUT TRANSACTIONAL:
---------------------------------------
When we issue shut transactional to shutdown the database
oracle immediately disconnects idle users  and still it waits for 
the active users either commit or rollback the transaction.
once they transaction is over oracle immediately disconnects 
these users as well.
like shutnormal before shutdown the database oracle performs 
a proper checkpoint.
Once we issue transactional no new end user is allowed into the
database.oracle closes all datafiles,Redologfiles,controlfiles serially

---------------------------------
SHUT IMMEDIATE:
------------------------------
This command used to shut down the database immediately
by disconnecting the idle users and rollback active user transactions.
In this case oracle forces all the connected users to disconnected  immediately.
once we shut immediate issue command no new end user allow 
to enter.
Before closing a database oracle performs proper checkpoint at 
end it updates same checkpoint scn number all the datafiles  
header and controlfiles.
--------------------------------
SHUT ABORT:
------------------------
When above 3 methods doesn't work a down database then we
need to use shut abort 
This is not recommended way to down the database.
when we issue this command oracle immediately clears the 
instance without performing a proper checkpoint and downs
the database without closing any or the database files.
Not performing a proper checkpoint prior to shutdown the 
database in the next startup oracle requires instance recovery.
Instance reovery will automatically done by the SMON process.
while opening a database next time smon background process 
compares START_SCN value with STOP_SCN value stored in 
controlfile 
They are not same the smon understands that previous shutdown 
was not a normal shutdown (or) abnormal shut down
It inciates instance recovery using current Redologfiles.




No comments:

Post a Comment