Home > Database > Oracle > body text

How to close an instance in oracle

青灯夜游
Release: 2022-03-02 18:58:44
Original
4981 people have browsed it

Methods to shut down an instance: 1. Use the "shutdown normal;" statement; 2. Use the "shutdown transactional;" statement; 3. Use the "shutdown immediate;" statement; 4. Use the "shutdown abort;" statement .

How to close an instance in oracle

#The operating environment of this tutorial: linux5.9.8 system, Oracle 11g version, Dell G3 computer.

Oracle instance refers to the collective name composed of Oracle memory structure (SGA) and Oracle process. The Oracle database we often refer to refers to the Oracle database management system, which is composed of the Oracle database (data storage) and instances that manage the database.

Oracle instance is Oracle using the background memory structure (SGA) and processes to manage the Oracle database and provide services at the same time.

How does oracle close an instance

Oracle closes a database instance in three steps:

  • Close the database

  • Uninstall the database

  • Close the Oracle instance

1. NORMAL mode: Normal shutdown mode. If there is no limit on the time to close the database, this method is usually used to close the database.

shutdown normal;
Copy after login

Explanation: When data is closed in the normal way, Oracle performs the following operations:

(1) Prevent any user from establishing a new connection.

(2) Wait for all currently connected users to actively disconnect (In this method, Oracle will not immediately disconnect the current users, and these users will still perform related operations)

( 3) Once all users are disconnected, immediately close and unload the database, and terminate the instance. (Therefore, when closing the database in a normal way, all online users should be notified to disconnect as soon as possible)

2. TRANSACTINOAL mode: Transaction closing mode, the first task is to ensure that all current All active transactions can be committed and the database closed in the shortest possible time.

shutdown transactional;
Copy after login

Explanation: This method is between the normal shutdown method and the immediate shutdown method. The response time will be faster and the processing will be more appropriate. The execution process is as follows:

(1) Prevent any user from establishing a new connection, and prevent currently connected users from starting any new transactions.

(2) Wait for all uncommitted active transactions to be submitted, and then immediately disconnect the user.

(3) Directly close and uninstall the database, and terminate the instance.

3. IMMEDIATE method: Immediate shutdown method. This method can shut down the database in the shortest possible time.

shutdown immediate;
Copy after login

Explanation:

(1) Prevent any user from establishing a new connection, and prevent currently connected users from starting any new transactions.

(2) Oracle does not wait for online users to actively disconnect, forcibly terminates the user's current transaction, and rolls back any uncommitted transactions. (If there are too many uncommitted transactions, this method will take a long time to terminate and roll back the transactions)

(3) Directly close and unload the database, and terminate the instance.

4. ABORT method: Termination closing method, the termination closing method is mandatory and destructive to a certain extent.

shutdown abort;
Copy after login

Explanation: This is a rough shutdown method. When the previous three methods cannot be closed, you can try to use the termination method to close the database. However, closing the database in this way will lose some data information. When the instance is restarted and the database is opened, the background process SMON will perform instance recovery operations. In general, you should try to avoid using this method to close the database. The execution process is as follows:

(1) Prevent any user from establishing a new connection, and prevent currently connected users from starting any new transactions.

(2) Immediately terminate the currently executing SQL statement.

(3) Any uncommitted transactions will not be delisted.

(4) Directly disconnect all users, close and uninstall the database, and terminate the instance.

Recommended tutorial: "Oracle Tutorial"

The above is the detailed content of How to close an instance in oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template