SHUTDOWN

The SHUTDOWN command allows you to close a database and stop an Oracle instance. Chapter 10 discusses this command. In order to use SHUTDOWN, you must be connected as SYSDBA, SYSOPER, or INTERNAL.

SHUTDOWN [NORMAL|IMMEDIATE|TRANSACTIONAL|ABORT]

where:

SHUTDOWN

Is the command, which may not be abbreviated.

NORMAL

Causes a normal shutdown to take place. New users are blocked from connecting. The database remains open until all currently connected users voluntarily disconnect. When the last user disconnects, the database files are closed, the database is dismounted, and the instance is stopped.

IMMEDIATE

Causes users to be summarily disconnected when their current SQL statement completes execution. Users not in the middle of executing a statement are disconnected immediately. As each remaining user’s currently executing SQL statement completes, she is forcibly disconnected from the database. Any open transactions are rolled back, the database files are closed, the database is dismounted, and the instance is stopped.

TRANSACTIONAL

A compromise between NORMAL and IMMEDIATE. Users are allowed to finish their current transactions. As each user completes his current transaction, he is forcibly disconnected. When the last user disconnects, the database is closed, then dismounted, and finally the instance is stopped.

ABORT

Is tantamount to pulling the plug on the server. All background processes are immediately aborted. Users are summarily disconnected. No rollback is done on open ...

Get Oracle SQL*Plus: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.