next up previous contents
Next: Destroy the database Up: Oracle Basics Previous: Destroying Schema Objects   Contents

Stopping the database

If your not already logged in, do so now and shutdown the database.

bash-2.05$ sqlplus /nolog

SQL*Plus: Release - Production on Wed Oct 6 11:25:46 2004

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

SQL> connect sys/passwd as sysdba;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit

There are a variety of different shutdown methods other than immediate. Using shutdown without an argument is rarely used because the database won't shutdown until all connections have been disconnected willingly, during which time it simply won't allow any new connections. The problems is that if a session is hung or a user went to lunch without disconnecting it could take a long long time. Shutdown immediate will safely close out all current connections regardless of whether or not they want to.