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

Issues and Solutions for Oracle 19c Grid Infrastructure Installation

     Common Issues and Solutions for Oracle 19c Grid Infrastructure Installation •       Check Log Files for Details Oracle installation issues often provide valuable clues in the log files. If the installer seems stuck or fails, check the following logs: ▪ Install log : /u01/app/oraInventory/logs/installActions<date>.log •       ▪ Grid Infrastructure log : $ORACLE_BASE/cfgtoollogs/ •         •       These logs can provide error messages and help identify the exact issue. •         •        Check Permissions and Ownership Verify that the Oracle Grid Infrastructure installation directories have the correct ownership and permissions. •        For example: •        Make sure the grid user has permission to write to the directories where the i...

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 ...

How to Improve Oracle Data Pump Performance - IMPDP

  How to Improve Oracle Data Pump Performance:- Use Parallelism : Set the PARALLEL parameter to at least 2 * number of CPUs . This allows multiple worker processes to perform tasks simultaneously, speeding up both export and import processes. Example: PARALLEL=4 for a system with 2 CPUs. Perform Import Using NETWORK_LINK : Use the NETWORK_LINK parameter to import data directly from the source database. This method is particularly helpful when space is constrained, as it streams the data without needing to generate dump files on the source. It can also reduce time compared to exporting and then importing, as data is streamed directly from the source to the target database. Disable Archivelog Mode (Standalone Databases) : For standalone databases, temporarily disable archive logging during the import process. Import operations can generate a lot of redo logs, slowing down the import. Disabling...