From Technical Knowledge to IT Service Management

Archive for February 2008

Startup and Shutdown Options

When everything is ok, you should do like that:

startup
STARTUP OPEN PFILE=%ORACLE_BASE%\admin\nuxoradb\pfile\init.ora

shutdown
CONNECT system/manager@nuxoradb AS SYSDBA
SHUTDOWN NORMAL

The OPEN option starts the instance, reads the control file, attaches the database, and then opens it.
The OPEN option is the default option, it is not mandatory to write it.

The NORMAL option will wait for users to log out and then it will close the database and shutdown the instance.

Oracle logs, such as alert log file are very useful and give a good status about the databse and can explain many things, and help you to choose between different options.

Depending your needs, the situation you are facing, many options are available to start a database:

startup MOUNT
CONNECT system/manager@nuxoradb AS SYSDBA
STARTUP MOUNT PFILE=%ORACLE_BASE%\admin\nuxoradb\pfile\init.ora

The MOUNT option, starts the instance, reads the control file, and attaches the database, but does not open it.

To open and use the database:

ALTER DATABASE OPEN;

You have to do that because MOUNT option does’nt open your database

startup NOMOUNT
CONNECT system/manager@nuxoradb AS SYSDBA
STARTUP NOMOUNT PFILE=%ORACLE_BASE%\admin\nuxoradb\pfile\init.ora


The NOMOUNT option starts the instance without mounting the database. It means that only the memory structure and background processes are set up.

To open and use the database, you’ll have then to MOUNT it and OPEN it:

ALTER DATABASE MOUNT;
ALTER DATABASE OPEN;

startup READONLY
CONNECT system/manager@nuxoradb AS SYSDBA
STARTUP OPEN READ ONLY PFILE=%ORACLE_BASE%\admin\nuxoradb\pfile\init.ora

In the READ ONLY mode, You can only read, and no modification is possible, insert, update, or delete, create, later or drop are impossible to use.

And off course many options to shutdown oracle:

shutdown IMMEDIATE

CONNECT system/manager@nuxoradb AS SYSDBA
SHUTDOWN IMMEDIATE

The IMMEDIATE option won’t wait a user’s logoff either uncommitted rollback, it will shutdown the instance and close the database immediatly.

shutdown TRANSACTIONAL
SHUTDOWN TRANSACTIONAL
CONNECT system/manager@nuxoradb AS SYSDBA

The TRANSACTIONAL option tells oracle not to wait for a user to log off, but wait for the client to end the transaction that is in progress, then shut down the instance and close the database.

shutdown ABORT
CONNECT system/manager@nuxoradb AS sysdba
SHUTDOWN ABORT

The ABORT option shutdown the instance (no roll back, user sessions are killed).

And then you have a special option, in case of emergency:

shutdown ans startup FORCE
CONNECT system/manager@nuxoradb AS sysdba
STARTUP FORCE PFILE=%ORACLE_BASE%\admin\nuxoradb\pfile\init.ora