Check Cluster Commands

Ref:http://youroracledba.wordpress.com/2012/11/23/rac-commands-srvctl-in-detail/

display the registered databases srvctl config database
statussrvctl status database -d <database
srvctl status instance -d <database> -i <instance>
srvctl status nodeapps -n <node>
srvctl status service -d <database>
srvctl status asm -n <node>
stopping/starting srvctl stop database -d <database>
srvctl stop instance -d <database> -i <instance>,<instance>
srvctl stop service -d <database> [-s <service><service>] [-i <instance>,<instance>]
srvctl stop nodeapps -n <node>
srvctl stop asm -n <node>

srvctl start database -d <database>
srvctl start instance -d <database> -i <instance>,<instance>
srvctl start service -d <database> -s <service><service> -i <instance>,<instance>
srvctl start nodeapps -n <node>
srvctl start asm -n <node>
adding/removingsrvctl add database -d <database> -o <oracle_home>
srvctl add instance -d <database> -i <instance> -n <node>
srvctl add service -d <database> -s <service> -r <preferred_list>
srvctl add nodeapps -n <node> -o <oracle_home> -A <name|ip>/network
srvctl add asm -n <node> -i <asm_instance> -o <oracle_home>

srvctl remove database -d <database> -o <oracle_home>
srvctl remove instance -d <database> -i <instance> -n <node>
srvctl remove service -d <database> -s <service> -r <preferred_list>
srvctl remove nodeapps -n <node> -o <oracle_home> -A <name|ip>/network
srvctl asm remove -n <node> 
Use the crsctl command to determine if the cluster is working on a specific node
$GRID_HOME/bin/crsctl check crs
use the crsctl command to check if CSS is running across all nodes of the cluster:
$GRID_HOME/bin/crsctl check cluster
crsctl command will provide a report on all the cluster resources and if they are running.
$GRID_HOME/bin/crsctl stat res –t
Starting and Stopping the Cluster
Use the crsctl command to start and stop the cluster on a specific node. This example starts the cluster and the following example stops the cluster.
$GRID_HOME/bin/crsctl start crs
$GRID_HOME/bin/crsctl stop crs
Enable or Disable Oracle Clusterware Daemons
$GRID_HOME/bin/crsctl disable crs
$GRID_HOME/bin/crsctl enable crs
Managing the Voting Disks
crsctl command is also useful for managing the voting disks. This command locates all the voting disks that you have allocated:

$GRID_HOME/bin/crsctl query css votedisk
Adding or Removing a Database to the Oracle Restart Configuration using SRVCTL
If you add a RAC database manually you will need to add it to the Oracle Restart configuration so Oracle Restart will manage it. In the following example we add a database called newdb:
Srvctl add database –d newdb –o $ORACLE_HOME
This command will remove that same database from the Oracle Restart configuration. Note that this does not remove the database, shut it down or clean up database datafiles.

Srvctl remove database –d newdb
Start and Stop a RAC Database with SRVCTL
The following commands will start and stop a database instance on the cluster.
Srvctl stop database –d orcl –i orcl1
If we wanted to stop the database on the entire cluster we would issue this command instead:
Srvctl stop database –d orcl
The following command will restart the orcl1 instance on the orcl database:
Srvctl start database –d orcl –i orcl1
This command will restart all instances of the orcl database:
Srvctl start database –d orcl
Adding or Removing a Database to the Oracle Restart Configuration using SRVCTL
If you add a RAC database manually you will need to add it to the Oracle Restart configuration so Oracle Restart will manage it. In the following example we add a database called newdb:
Srvctl add database –d newdb –o $ORACLE_HOME
This command will remove that same database from the Oracle Restart configuration. Note that this does not remove the database, shut it down or clean up database datafiles.
Srvctl remove database –d newdb
Start and Stop a RAC Database with SRVCTL
The following commands will start and stop a database instance on the cluster.
Srvctl stop database –d orcl –i orcl1
If we wanted to stop the database on the entire cluster we would issue this command instead:
Srvctl stop database –d orcl
The following command will restart the orcl1 instance on the orcl database:
Srvctl start database –d orcl –i orcl1
This command will restart all instances of the orcl database:
Srvctl start database –d orcl
Checking a Oracle Database Restart Configuration using SRVCTL
The following example checks the restart configuration for an Oracle Database using the srvctl command:
Srvctl config database –d orcl

Comments

Popular posts from this blog

QUERY DATAGUARD AND STANDBY STATUS

Blocking session on RAC database

Finding object size in Oracle database