Starting and Stopping commands for RAC instances

Starting and Stopping commands for RAC instances

Starting and Stopping of RAC instance is managed from OS with srvctl command.
It provide different option at database , instance and service level to stop and start the database or instances present in RAC Environment.

Following are the command for Sart or Stop the database/instances:

Start or Stop the Instance of database:
command start/stop the Particular|all instances with services.

srvctl start/stop instance -db ORCL -node NODE1 -instance ORCL_1 -STARTOPTION|STOPOPTION
[OPEN | MOUNT | NOMOUNT | NORMAL | TRANSACTIONAL | IMMEDIATE | ABORT ]

Start or stop all instance of database with database
It start/stop the cluster database with enable all instances and services

srvctl start|stop database -db ORCL -startoption|stopoption
[OPEN | MOUNT | NOMOUNT | NORMAL | TRANSACTIONAL | IMMEDIATE | ABORT ]

Starting or stopping with SQLPLUS:
Note: you cannot start/stop multiple instance in SQLPLUS. Only current instance you can start or shutdown with sqlplus prompt:

sqlplus sys@orcl_1 as sysdba
shutdown immediate;
startup;

sqlplus sys@orcl_2 as sysdba
shutdown immediate;
startup;

Examples of start or stop with srvctl commands:

Check the status of instances in the database:

srvctl status database -db ORCL
Instance ORCL_1 is running on node NODE1
Instance ORCL_2 is running on node NODE2
Instance ORCL_3 is running on node NODE3

Stop the instance ORCL_1 with srvctl command

srvctl stop instance -db ORCL -node NODE1 -stopoption abort
OR
srvctl stop instance -db ORCL -instance ORCL_1 -stopption abort

Check the status of one instance is stopped in ORCL RAC:

srvctl status database -db ORCL
Instance ORCL_1 is not running on node NODE1
Instance ORCL_2 is running on node NODE2
Instance ORCL_3 is running on node NODE3

Stop all the instance then we used database option to stop:

srvctl stop database -db ORCL -stopoption transactional

Check the database status all instances must be stopped.

srvctl status database -db ORCL
Instance ORCL_1 is not running on node NODE1
Instance ORCL_2 is not running on node NODE2
Instance ORCL_3 is not running on node NODE3

Start the one instance of ORCL database:

srvctl start database -db ORCL -node NODE1
or
srvctl start database -instance ORCL_1

Check status node1 is started:

srvctl status database -db ORCL
Instance ORCL_1 is running on node NODE1
Instance ORCL_2 is not running on node NODE2
Instance ORCL_3 is not running on node NODE3

Start all the instances with database command:

srvctl start database -ORCL

Check status of all instances:

srvctl status database -db ORCL
Instance ORCL_1 is running on node NODE1
Instance ORCL_2 is running on node NODE2
Instance ORCL_3 is running on node NODE3

Manage the RAC pluggable database start/stop by services
Note: Need to assign the service to pluggable database for manage start or stop of PDB database.

1. Assign a service to pdb1 pluggable database :

srvctl add service -db raccdb -pdb pdb1 -service pdb1srv -serverpool sp1

2. For start or stop the pluggable database:

srvctl start service -db raccdb -service pdb1srv

srvctl stop service -db raccdb -service pdb1srv

3. Check the status for pluggable database:

srvctl status service -db raccdb -service pdb1arv

Advertisements

2 thoughts on “Starting and Stopping commands for RAC instances

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s