Thursday, September 15, 2011

Oracle Startup & Shutdown


Startup NOMOUNT

1) Control files are not read
2) Data files are not open
3) Background processes are started, SGA is allocated to Oracle by OS.
4) Instance is running by itself

Startup MOUNT

1) Oracle associates Instance with the database
2) Oracle opens and reads control files and gets names and location of data files and redo log files

Alter database mount
or
Startup Mount

Startup OPEN
1) Last stage of startup process.
2) Oracle reads all the data files and online redo logs, verifies that the database is consistent
3) If the files are not consistent, background process performs media recovery automatically.
4) Now all users can connect to database.

Alter database Open

Startup --> Mounts and Opens the database


Startup Restrict
1) No other users can connect to database other than you.
2) All new logins to the database are prevented
3) Existing logins will work.

Read Only

Startup Mount
Alter database open Read only


Shutdown or Shutdown Normal
1) No new user connections are allowed
2) Oracle waits for all users to exit their sessions, before shutting down the database.
3) No instance recovery is needed, as Oracle will write all redo log buffers to disk and database will be consistent
3) Oracle closes data files, terminates background process and sga is deallocated

Shutdown Transactional
1) Oracle waits for all active transactions to complete
2) Oracle will not wait for all users to log out their sessions.
3) New connections are not permitted, existing users cannot start new transaction
4) As long as no pending transactions, oracle will shutdown
5) No instance recovery is needed

Shutdown Immediate
1) All active transactions are rolled back
2) Disconnects all active users
3) This process is not immediate as it has to rollback all existing transactions
4) No new connections are permitted
5) No instance recovery needed

Shutdown Abort
1) Existing connections are terminated. Doesn't care about rolling back
2) Redo logs buffers are not written to disk
3) Upon restart, Oracle performs instance recovery.

Dropping Database
1) Connect as sys
2) Startup restrict mount
3) select name from v$database --> Just to check
4) Drop Database

2 comments:

Nivas Desireddy said...

Startup Restrict
1) No other users can connect to database other than you.
2) All new logins to the database are prevented
3) Existing logins will work.

after shutting down only we will give startup restrict only command right,in that case there will be no connected users right ,once you shutdown the db users will be disconnected right
how it is possible. startup restrict command works after starting the db?

Oracle DBA said...

Once you open the database in restricted mode still users with restricted privs can able to connect

Post a Comment

Auto Scroll Stop Scroll