Startupandshutdown o
Startupandshutdown o
When startup command is issued, Oracle looks for the parameter fle in following
order.
1. Spfle<SID>.ora
. init<SID>.ora
Oracle look for the parameter fle in !O"#$%&'(O)&*d+s
We can startup the data+ase instance with following options.
1. startup
. startup nomount
,. Startup mount
startup pfle-.*location*flename.
/. startup upgrade
0. startup mount restrict
1. startup:-
1. It will read the parameter fle.
. It will start the +ackground processes and allocate memor1 2S3#4. 5 Instance
started.
,. It reads the controlfle. 5Instance mounted.
/. 6h1sicall1 checks the datafles and redolog fles.
0. $hecks the S$7 num+er of the datafles and controlfles.
It is used in normal situations.
If the S$7s in the control fles don.t match some of the S$7s in the data fles
headers8the +ackground process 2smon4 will automaticall1 perform an instance
reco9er1 +efore opening the data+ase.
2. startup mount:--
It will do 1, and ,.
It will not do / and 0.
$an +e used when:;; "eco9er1 is needed for the entire data+ase, <lash+ack is to +e
performed, an1 feature like archi9e log is to +e ena+led or disa+led.
3. startup nomount:--
It will do 1 and .
It will not do ,,/ and 0.
$an +e used when:;; $reating data+ase and creating controlfle.
4. startup upgrade:--
It will do 1 to 0 and
=. 3i9e the option of upgrading data+ase.
>. ?sers cannot connect to the data+ase.
$an +e used to upgrade the data+ase dictionar1
Data+ase must +e shutdown and restarted for users to connect.
5. startup mount restrict:--
It will read 1, and ,.
It will not read / and 0.
?sed when the data+ase is dropped.
Changing the status:--
Alter database mount
@his command can +e used when data+ase is in nomount state, this will read the
controlfles and mount the data+ase.
Alter database open
@his command can +e used when data+ase is mounted.
@his will read the datafles and redolog fle and will check if the datafles are
consistent. #llows the users to connect to the data+ase,
Alter database close
@his command can +e used when data+ase open. @his will release the datafles and
redolog fles.
?ser connections will not +e allowed. Status will change to mount.
Alter database dismount
@his command can +e used when data+ase is at mount state. @his will release the
control fle and change the status to nomount.
!he database can be shutdown with the "ollowing options:--
Shutdown:--
7o new user connections can +e made to the data+ase once the command is
issued. Oracle waits for all users to eAit their sessions +efore shutting down the
data+ase. 7o instance reco9er1 is needed when 1ou restart data+ase, it will +e
consistent when it.s shut down in this wa1. Oracle closes the data fles and
terminates the +ackground processes. Oracle.s S3# is deallocated.
Shutdown transactional:--
7o new user connections are permitted once the command is issued. &Aisting users
can.t start a new transaction and will +e disconnected. If a user has a transaction in
progress, oracle will wait until the transaction is completed +efore disconnecting the
user. #fter all eAisting transactions are completed. Oracle shuts down the instance
and deallocates memor1. Oracle writes all redo log +uBers and data +lock +uBers to
disk. 7o instance reco9er1 is needed +ecause the data+ase is consistent.
C&3I7
DC)S'%O$D.sleep2seconds -> =E.E14F
&7DF
*
Shutdown immediate:--
7o new user connections are allowed once the command is issued. Oracle
immediatel1 disconnects all users. Oracle terminates all currentl1 eAecuting
transactions. <or all transactions terminated midwa1, oracle will perform a roll+ack
so that data+ase ends up consistent. Sometimes oracle ma1 +e +us1 rolling +ack
the transactions it Gust terminated. Oracle terminates the +ackground processes and
deallocates memor1. 7o instance reco9er1 is needed upon starting up the data+ase
+ecause it is consistent when shut down.
Shutdown abort:--
7o new connections are permitted once the command is issued. &Aisting sessions
are terminated, regardless of whether the1 ha9e an acti9e transaction or not. Oracle
doesn.t roll +ack the terminated transactions. Oracle doesn.t write the redo log
+uBers and data +uBers to disk. Oracle terminates the +ackground processes,
deallocates memor1 immediatel1, and shutdown. ?pon restarting, oracle will
perform an automatic instance reco9er1, +ecause the data+ase isn.t guaranteed to
+e consistent when shut down.