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

CHANGING DBID FOR ORACLE DATABASE 11G

C:\Users\computer>sqlplus SQL*Plus: Release 11.1.0.7.0 - Production on Thu Sep 10 21:03:33 2013 Copyright (c) 1982, 2008, Oracle.  All rights reserved. Enter user-name: sys as sysdba Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select dbid from v$database;       DBID ---------- 2188161033 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options C:\Users\computer>nid DBNEWID: Release 11.1.0.7.0 - Production on Thu Sep 10 21:04:44 2013 Copyright (c) 1982, 2007, Oracle.  All rights reserved. Keyword     Description                    (Default) ---------------------------------------------------- TARGET ...

Difference between AWR, ADDM and ASH reports

AWR: Automatic Workload Repository gathers, processes and maintains performance stats used for problem detection and self-tuning the databases. Different Components that uses AWR are: Automatic Database Diagnostic Monitor Undo Advisor SQL Tuning Advisor Segment Advisor Different types of AWR Reports for different purposes: For Single Instance Environment: @$ORACLE_HOME/rdbms/admin/awrrpt.sql For Oracle RAC Environment : @$ORACLE_HOME/rdbms/admin/awrgrpt.sql For a particular SQL Statement : @$ORACLE_HOME/rdbms/admin/awrsqrpt.sql For Comparing the reports : @$ORACLE_HOME/rdbms/admin/awrddrpt.sql ADDM: Automatic Database Diagnostic Monitoring Report analyzes the AWR data on a regular basis, to give you overview of the root cause of the problem which is affecting your database’s performance. It also provides suggestions or recommendations for rectifying any problem identified and lists the areas which are having no issues. ADDM recommends multiple solutions for the DBA to choose from which...