DBAtlas · Database operations atlas

Stop / start a RAC database or a single instance with srvctl (rolling)

OracleRAC & Grid

Command

# Whole database (all instances):
srvctl stop database -db <db_unique_name> -stopoption immediate
srvctl start database -db <db_unique_name>
# Rolling maintenance: stop one instance, moving its services to the other instances
srvctl stop instance -db <db_unique_name> -instance <instance> \
  -stopoption immediate -drain_timeout 300 -failover
srvctl start instance -db <db_unique_name> -instance <instance>
# By node:
srvctl stop instance -db <db_unique_name> -node <node> -stopoption immediate
# Start in a specific open mode (e.g. a physical standby in mount):
srvctl start database -db <db_unique_name> -startoption mount

What it does

Stops/starts the database or the selected instance in a controlled way through Clusterware; with -failover the services on the stopped instance move to available instances, and -drain_timeout waits for sessions to drain.

When to use it

For rolling (node by node) restarts during patching, OS maintenance or parameter changes; for a planned full shutdown.

Caution

In RAC use srvctl instead of SQL*Plus SHUTDOWN; otherwise Clusterware does not know the resource TARGET and may restart the instance. stop database shuts down all instances = full outage. If services have no available instances defined, -failover cannot move the connections.

Open in DBAtlas →

Related