Database Reference
In-Depth Information
Using RMAN to Stop/Start Oracle
You can use RMAN to stop and start your database with methods that are almost identical to those available through
SQL*Plus. When performing restore and recovery operations, it's often more convenient to stop and start your
database from within RMAN. The following RMAN commands can be used to stop and start your database:
SHUTDOWN
•
STARTUP
•
ALTER DATABASE
•
Shutting Down
The
SHUTDOWN
command works the same from RMAN as it does from SQL*Plus. There are four types of shutdown:
ABORT
,
IMMEDIATE
,
NORMAL
, and
TRANSACTIONAL
. I usually first attempt to stop a database using
SHUTDOWN IMMEDIATE
;
if that doesn't work, don't hesitate to use
SHUTDOWN ABORT
. Here are some examples:
RMAN> shutdown immediate;
RMAN> shutdown abort;
If you don't specify a shutdown option,
NORMAL
is the default. Shutting down a database with
NORMAL
is rarely
viable, as this mode waits for currently connected users to disconnect at their leisure. I never use
NORMAL
when
shutting down a database.
Starting Up
As with SQL*Plus, you can use a combination of
STARTUP
and
ALTER DATABASE
commands with RMAN to step the
database through startup phases, like this:
RMAN> startup nomount;
RMAN> alter database mount;
RMAN> alter database open;
Here is another example:
RMAN> startup mount;
RMAN> alter database open;
If you want to start the database with restricted access, use the DBA option:
RMAN> startup dba;
■
starting with oracle 12c, you can run all sQL statements directly from within rMaN without having to specify the
rMaN
sql
command.
Tip