Learn how to start and shut down a database with SQL *Plus.
These instructions assume that a database instance has been created.
Directory path examples in this chapter follow Optimal Flexible Architecture (OFA) guidelines. If you specified directories during installation that do not comply with OFA guidelines, then your directory paths differ.
To start or shut down Oracle Database:
- Go to your Oracle Database server.
- Start SQL*Plus at the command prompt:
C:\> sqlplus /NOLOG
- Connect to Oracle Database with username SYSDBA:
SQL> CONNECT / AS SYSDBA
- To start a database, enter:
SQL> STARTUP [PFILE=path\filename]
This command uses the initialization parameter file specified in
filename. To start a database using a file named
SQL> STARTUP PFILE=C:\app\username\product\11.2.0\admin\orcl\pfile\init2.ora
PFILEis specified, then the command looks for an
\database. If the command finds one, then the command uses it to start the database. If it does not find an
SPFILE, then it uses the default initialization parameter file located in
- To stop a database, enter:
SQL> SHUTDOWN [mode]
The mode is
normalshutdown, Oracle Database waits for all currently connected users to disconnect and disallows any new connections before shutting down. This is the default mode.
immediateshutdown, Oracle Database terminates and rolls back active transactions, disconnects clients, and shuts down.
abortshutdown, Oracle Database terminates active transactions and disconnects users; it does not roll back transactions. The database performs automatic recovery and rollback the next time it is started. Use this mode only in emergencies.
See Also:Oracle Database Installation Guide for Microsoft Windows for more information about "Optimal Flexible Architecture"