Add database to Oracle Restart

With Oracle Real Application Clusters the Oracle database can be configured to restart as each node in the cluster is restarted.  For single instance databases that are on a standalone server, often times the database is not configured to restart on a server bounce.  In the past, Oracle recommended to set the database for restart in the /etc/oratab file and create as script in the /etc/init.d directory to force the restart.  This approach often times did not work (in my experience).  How do we enable a restart of a single instance database successfully?

Oracle Restart!  Oracle Restart is a component of the Oracle Grid Infrastructure (GI) package which is used to configure a restart of items on the server, ie Oracle Database (single instance).  The added benefit of using Oracle Restart (Grid Infrastructure) is the usage of Automatic Storage Management (ASM) is included.  Databases that are created after Oracle Restart is installed will use ASM; all previous databases (file system based) will  not be configured in the Cluster Ready Service (CRS) stack.  How do we add a database to the CRS stack after Oracle Restart is installed?

To add a database to the CRS stack, we need to use the Server Control (SRVCTL) command. The below command will add a database named “bc11gtst” to the stack and enable it to be restarted when the server is restarted.  Each of the options used can be looked up with the help option ($GRID_HOME/bin/srvctl –h).

srvctl add database
-d bc11gtst
-o /opt/oracle/
-p /opt/oracle/

After configuring the database in the CRS, if the need to remove it from the CRS arises; the following command can be used.

srvctl remove database
-d bc11gtst

As with the CRS ona full RAC, we can get the list of targets and check on the status of them using the same command (crs_stat –t –v). 

[[email protected] Desktop]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host       
ora.DATA.dg    ora….up.type 0/5    0/     ONLINE    ONLINE    tester     
ora….ER.lsnr ora….er.type 0/5    0/     ONLINE    ONLINE    tester     
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    tester     
ora….gtst.db ora….se.type 0/2    0/1    ONLINE    ONLINE    tester     
ora.cssd       ora.cssd.type  0/5    0/5    ONLINE    ONLINE    tester     
ora.diskmon    ora….on.type 0/10   0/5    OFFLINE   OFFLINE              
ora.evmd       ora.evm.type   0/10   0/5    ONLINE    ONLINE    tester     
ora.ons        ora.ons.type   0/3    0/     OFFLINE   OFFLINE

In closing, using Oracle Restart is a great approach to enabling single instance databases for successful restarts.  Also, the ability to use Automatic Storage Management (ASM) and Cluster Ready Services (CRS) enables a DBA to learn more about these options before moving to a full Real Application Cluster (RAC).  More information can be found here.


twitter: @dbasolved



  1. Hi Curtis,
    Nice post. A few quick notes. crs_stat has been deprecated since 11gR2. Use crsctl status resource instead.
    Also since 12.1 Oracle Restart has been deprecated. While no one knows what exactly that means it is something to keep in mind. See MOS note 1584742.1 -Support Impact of the Deprecation Announcement of Oracle Restart.

  2. Im not optimistic the destination you are getting the details, although great topic. I have to spend a little while learn a lot more or simply identifying considerably more. Be grateful for wonderful info I was looking for these details with regard to my mission.

  3. […] to help start the database on a server reboot (if you want to read that post, you can find it here).    Since my original post on using Oracle Restart to start a database, I’ve […]

Leave a Reply to Leighton L. Nelson (@leight0nn) Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: