Cluster command in Oracle clusterware 10g and 11g



Last updated on September 1st, 2016 at 05:21 am

Oracle clusterware is the clusterware technology from oracle to Manage Oracle RAC database on various platform.Oracle  has provide cluster utilities to manage it. Here are some of the useful Cluster command  in 10g and 11g

 CRSCTL

Cluster Control utility performs various administrative operation of oracle clusterware. It is located in $ORA_CRS_HOME/bin and must be executed by the “root” user.

a. To check the current state of all oracle clusterware daemon:

[root@PROD1 bin]# ./crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

b.You can also check the state of individual oracle clusterware daemon:

[root@PROD1 bin]# ./crsctl check cssd

CSS appears healthy

[root@PROD1 bin]# ./crsctl check crsd

CRS appears healthy

[root@PROD1 bin]# ./crsctl check evmd
EVM appears healthy

c. To start oracle clusterware

[root@PROD1 bin]# ./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly

d. To stop oracle clusterware

[root@PROD1 bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.

e. To disable oracle clusterware:

[root@PROD1 bin]# ./crsctl disable crs

f. To enable oracle clusterware:

[root@PROD1 bin]# ./crsctl enable crs

g. To get current value of CSS parameter

[root@PROD1 bin]# ./crsctl get css

for example: to get value of misscount parameter

[root@PROD1 bin]# ./crsctl get css misscount
60

h. To set a new value of CSS parameter

[root@PROD1 bin]# ./crsctl set css

for example: to set value of misscount parameter

[root@PROD1 bin]# ./crsctl set css misscount 120
Configuration parameter misscount is now set to 120.

i. To unset CSS parameter value

[root@PROD1 bin]# ./crsctl unset css

for example: to unset value of misscount parameter

[root@PROD1 bin]# ./crsctl unset css misscount
Configuration parameter misscount is now undefined.

j. To list the module for debugging in CSS

[root@PROD2 bin]# ./crsctl lsmodules css
The following are the CSS modules ::
CSSD
COMMCRS
COMMNS

CRS_STAT

It reports the current state of resources configured in the OCR.

[oracle@rac1 bin]$ ./crs_stat -t
Name Type Target State Host
———————————————————————————–
ora….C1.inst application ONLINE ONLINE PROD1
ora….C2.inst application ONLINE ONLINE PROD2
ora….AC1.srv application ONLINE ONLINE PROD1
ora.RAC.abc.cs application ONLINE ONLINE PROD1
ora.RAC.db application ONLINE ONLINE PROD2
ora….AC1.srv application ONLINE ONLINE PROD1
ora….ice2.cs application ONLINE ONLINE PROD1
ora….AC1.srv application ONLINE ONLINE PROD1

 

OCRDUMP

It dumps the contents of OCR into a text file.

[root@PROD1 bin]# ./ocrdump /home/oracle/ocr.dmp

OCRCHECK

It verifies the integrity of the OCR.

[root@PROD2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 5237072
Used space (kbytes) : 9360
Available space (kbytes) : 5227712
ID : 794527192
Device/File Name : /u01/oracle/oradata/ocr
Device/File integrity check succeeded

Cluster registry integrity check succeeded

OCRCONFIG: It perform various administrative operation on the OCR.

To know more about ocrconfig use click here: OCRCONFIG

oifcfg

$ORA_CRS_HOME/bin/oifcfg getif
eth0 10.2.13.0 global public
eth1 192.13.1.0 global cluster_interconnect

Oifcfg Usage:
oifcfg iflist
oifcfg setif {-node <nodename> | -global} {<if_name>/<subnet>:<if_type>}…
oifcfg getif [-node <nodename> | -global] [ -if <if_name>[/<subnet>] [-type <if_type>] ]
oifcfg delif [-node <nodename> | -global] [<if_name>[/<subnet>]]
oifcfg [-help]

<nodename> – name of the host, as known to a communications network
<if_name> – name by which the interface is configured in the system
<subnet> – subnet address of the interface
<if_type> – type of the interface { cluster_interconnect | public | storage }

These command are used to change the VIP,private network configuration in cluster

Cluvfy

It is Cluster Verification Utility

cluvfy commands

cluvfy [-help] or cluvfy -h

cluvfy stage {-pre|-post} stage_name stage_specific_options [-verbose]

cluvfy stage -post hwos -n node_list [-verbose]
./runcluvfy.sh stage -post hwos -n node1,node2 -verbose

cluvfy stage -pre cfs -n node_list [-verbose]
cluvfy stage -post cfs -n node_list [-verbose]

cluvfy stage -pre crsinst -n node_list [-c ocr_location] [-r {10gR1|10gR2|11gR1|11gR2}] [-q voting_disk] [-osdba osdba_group]
[-orainv orainventory_group] [-verbose]
cluvfy stage -pre crsinst -n node1,node2,node3
./runcluvfy.sh stage -pre crsinst -n all -verbose
cluvfy stage -post crsinst -n node_list [-verbose]

cluvfy stage -pre dbinst -n node_list [-r {10gR1|10gR2|11gR1|11gR2}] [-osdba osdba_group] [-orainv orainventory_group] [-verbose]
cluvfy stage -pre dbcfg -n node_list -d oracle_home [-verbose]

srvctl

srvctl start nodeapps -n node1
srvctl start asm -n node1
srvctl start instance -d PRODDB -i “PRODDB1”
srvctl start nodeapps -n node2
srvctl start asm -n node2
srvctl start instance -d PRODDB -i “PRODDB2”


Leave a Reply