To shut down a database and instance, you
must first connect as
SYSOPER
or SYSDBA.
·
Shutting Down with the NORMAL
Clause
·
Shutting Down with the
IMMEDIATE Clause
·
Shutting Down with the
TRANSACTIONAL Clause
·
Shutting Down with the ABORT
Clause
Shutting Down with the NORMAL Clause
To shut down a database in normal situations, use the SHUTDOWN
command with
the NORMAL
clause:SQL> SHUTDOWN NORMAL
The NORMAL
clause is optional, because this is the default shutdown method if
no clause is provided.Normal database shutdown proceeds with the following conditions:
·
No new connections are allowed
after the statement is issued.
·
Before the database is shut
down, the database waits for all currently connected users to disconnect from
the database.
The next startup of the database will not require any instance
recovery procedures.
Shutting Down with the IMMEDIATE Clause
Immediate database shutdown proceeds with
the following conditions:
·
No new connections are allowed,
nor are new transactions allowed to be started, after the statement is issued.
·
Any uncommitted transactions
are rolled back. (If long uncommitted transactions exist, this method of
shutdown might not complete quickly, despite its name.)
·
Oracle Database does not wait
for users currently connected to the database to disconnect. The database
implicitly rolls back active transactions and disconnects all connected users.
The next startup of the database will not require any instance
recovery procedures.
Shutting Down with the TRANSACTIONAL Clause
When you want to perform a planned shutdown
of an instance while allowing active transactions to complete first, use the SHUTDOWN
command with the TRANSACTIONAL
clause:SQL> SHUTDOWN TRANSACTIONAL
Transactional database shutdown proceeds with the following
conditions:
·
No new connections are allowed,
nor are new transactions allowed to be started, after the statement is issued.
·
After all transactions have
completed, any client still connected to the instance is disconnected.
·
At this point, the instance
shuts down just as it would when a
The next startup of the database will not require any instance
recovery procedures.SHUTDOWN IMMEDIATE
statement is submitted.
Shutting Down with the ABORT Clause
You can shut down a database
instantaneously by aborting the database instance.When you must do a database shutdown by aborting transactions and user connections, issue the
SHUTDOWN
command with the ABORT
clause:SQL> SHUTDOWN ABORT
An aborted database shutdown proceeds with the following conditions:
·
No new connections are allowed,
nor are new transactions allowed to be started, after the statement is issued.
·
Current client SQL statements
being processed by Oracle Database are immediately terminated.
·
Uncommitted transactions are
not rolled back.
·
Oracle Database does not wait
for users currently connected to the database to disconnect. The database
implicitly disconnects all connected users
.
No comments:
Post a Comment