How can I close an Oracle database? The following describes the three most common methods for shutting down an Oracle database.
1. Close normally
The option used to close the database normally is normal. Before the database is closed, all connections will be checked, and new user connections will not be allowed after the command is issued, and the database will be closed after all connections are closed, you do not need to recover the database again.
Connecting sys users
SQL> shutdown normal;
2. Emergency closure
This method is used in some emergency situations, such as notifying that a power outage is triggered immediately. In this case, the database needs to be closed urgently to cope with these situations. The option used in this method is immediate. In this method, the system disconnects and closes the database instead of waiting for all users to disconnect and close the connection.
SQL> shutdown immediate;
Once this command is executed, the SQL statement being processed will be immediately stopped, and all uncommitted transactions will be rolled back without waiting for the user currently connecting to the database to disconnect, instead, the system forcibly disconnects each connection. The next time you start the database, you need to perform the recovery action, but it is automatically executed by the system. You do not have to know about it.
3. Disable exceptions
In this way, the system does not perform any checks, disconnections, or rollback operations, but directly removes the database from the site. In this way, the database data on the site is of course invalid, the database is naturally shut down.
SQL> shutdown abort;
When the database is closed in abort mode, only one row of closing information indicates that the database site is closed. A database that is closed in abort mode must be restored when it is restarted. These recovery operations are also completed automatically by the system and take a long time.
Recommended Editing:
1. Structure and block size of the Index Tree in Oracle databases
2. Introduction to Oracle single row date functions
3. Introduction to different types of Oracle optimizer