Skip to content

How to Automatically Startup RAC Database after System Reboots

  • by

After installing grid infrastructure, you will have Oracle Clusterware, also called Cluster Ready Service, CRS controls all Oracle cluster components as resources, and manages the dependencies among resources, so it can coordinate their start and stop priority.

Restarting a database server will bring CRS up (ohasd), once CRS is up, CRS will arrange the resources to start according to the planned configuration.

One resource called ora.dbname.db is related to database, it can be planned the target state to ONLINE or OFFLINE by setting an attribute of AUTO_START. There are three options of AUTO_START:

  1. always: starts the resource ONLINE automatically after the node server restart.
  2. restore: remains the resource state as same as when the node server was shutdown, which means, if it was ONLINE/OFFLINE, then restarts the resource as ONLINE/OFFLINE.
  3. never: does not restart the resource after node server restart.

Now, let's check the current configuration of ora.dbname.db:

[grid@primary01 ~]$ crsctl status resource ora.dbname.db -p | grep AUTO_START

If you want to start database automatically every time the server restart, you can set AUTO_START to "always":

[grid@primary01 ~]$ crsctl modify resource ora.dbname.db -attr AUTO_START=always
[grid@primary01 ~]$ crsctl status resource ora.dbname.db -p | grep AUTO_START

For, you might see CRS-4995.

In my opinion, the option "restore" of AUTO_START is more reasonable for DBA to consider, here are my reasons:

  1. Sometimes server restart is for maintenance works or unplanned operations, these works need DBA's interventions to select a proper state to startup. In such case, you don't want to start database to start option.
  2. If the server restart is a planned restart, then keeping the state of the database will be more efficient.

Leave a Reply

Your email address will not be published.