Skip to main content

Shutting Down A Oracle Database



Below are the three methods are available to shut down the oracle database:

Normal Shutdown :  During normal shutdown, before the oracle database is shut down, oracle will wait for all active users to disconnect their sessions. As the parameter name (normal) suggest, use this option to shutdown the database under normal conditions.

1. No new connections are allowed after the statement is issued.

2. Before the database is shut down, Oracle waits for all currently connected users to disconnect from the database.

The next startup of the database will not require any instance recovery procedures.

Example:

Connect as sys user. and execute below

SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.

Shutdown Immediate: During immediate shutdown, before the oracle database is shut down, oracle will rollback active transaction and disconnect all active users. Use this option when there is a problem with your database and you don’t have enough time to request users to log-off.

1. To initiate an automated and unattended backup

2. When a power shutdown is going to occur soon

3. When the database or one of its applications is functioning irregularly and you cannot contact users      to ask them to log off or they are unable to log off

Immediate database shutdown proceeds with the following conditions:

1. No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.

2. Any uncommitted transactions are rolled back. (If long uncommitted transactions exist, this method of shutdown might not complete quickly, despite its name.)

3. Oracle does not wait for users currently connected to the database to disconnect. Oracle implicitly rolls back active transactions and disconnects all connected users.


4. The next startup of the database will not require any instance recovery procedures.

Example:

Connect as sys user. and execute below

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


Shutdown Abort:  During shutdown abort, before the oracle database is shutdown, all user sessions will be terminated immediately. Uncomitted transactions will not be rolled back. Use this option only during emergency situations when the “shutdown” and “shutdown immediate” doesn’t work.

Example:

$ sqlplus '/ as sysdba'

Connected to an idle instance.

SQL> shutdown abort
ORACLE instance shut down.

Points To Be Noted:

1.The database or one of its applications is functioning irregularly and none of the other types of shutdown works.

2. You need to shut down the database instantaneously (for example, if you know a power shutdown is going to occur in one minute).

3. You experience problems when starting a database instance.

4. When you must do a database shutdown by aborting transactions and user connections, issue the   SHUTDOWN command with the ABORT option:

SHUTDOWN ABORT

An aborted database shutdown proceeds with the following conditions:

1. No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.

2. Current client SQL statements being processed by Oracle are immediately terminated.

3. Uncommitted transactions are not rolled back.

4. Oracle does not wait for users currently connected to the database to disconnect. Oracle implicitly disconnects all connected users.

5. The next startup of the database will require instance recovery procedures.

Thank You!

Comments

Popular posts from this blog

ORA-39014: One or more workers have prematurely exited.ORA-00018: maximum number of sessions exceeded

ERROR: I was Performing a full database import and during the import I faced the below error. ORA-39014: One or more workers have prematurely exited. ORA-39029: worker 6 with process name "DW07" prematurely terminated ORA-31672: Worker process DW07 died unexpectedly. Job "SYSTEM"."SYS_IMPORT_FULL_04" stopped due to fatal error at 00:59:40 ORA-39014: One or more workers have prematurely exited. SOLUTION:  Run the import with fewer parallel processes, like PARALLEL=2 instead of 8. I was able to run the import successfully. NOTE 1: This errors occurs when there are less session allocation in the database. check the session,process parameters and increase them accordingly. To avoid such errors again. NOTE 2 : Note: Increasing processes parameter increases the amount of shared memory that needs to be reserved & the OS must be configured to support the larger amount of shared memory. So here we first need to increase the Memory & SG...

ORA-01143: cannot disable media recovery - file 1 needs media recovery

I got a request from the client - To flashback the database to the existing restore point & disable flashback and archive log mode for database UATB. Here I came a cross error - ORA-01143. I followed the below steps. 1. SQL> select name from v$database; NAME ------------ UATB 2. SQL> SELECT NAME FROM V$RESTORE_POINT WHERE GUARANTEE_FLASHBACK_DATABASE='YES' ORDER BY TIME; NAME --------- UATB_COPY Here I'm going to restore the database to the above restore point. NOTE: The flashback database restore has to be done in MOUNT stage of the database. SQL> select name from v$database; NAME --------- UATB SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area  612368384 bytes Fixed Size                  1250428 bytes Variable Size             167775108 bytes ...