Start CRS
crsctl start crs
Stop CRS
C:\>crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Check CRS’s status
C:\>crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
Display status of all services
C:\oracle\product\10.2.0\crs\BIN>crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora....B2.inst application ONLINE ONLINE rac2
ora.RACDB.db application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
Start/stop nodeapps
srvctl stop nodeapps -n <node name>
Start/stop ASM
srvctl start asm -n <node name>
srvctl stop asm -n <node name>
Start/stop a database (all nodes)
srvctl start database -d <database name>
srvctl stop database -d <database name>
Start/stop an individual instance
srvctl start instance -d <database name> -i <instance name>
srvctl stop instance -d <database name> -i <instance name>
before:
SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 RAC1:racdb1
2 RAC2:racdb2
C:\>srvctl stop instance -d racdb -i racdb2
after:
SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 RAC1:racdb1
restart:
C:\>srvctl start instance -d racdb -i racdb2
SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 RAC1:racdb1
2 RAC2:racdb2
Locate the voting disk
crsctl query css votedisk
C:\>crsctl query css votedisk
0. 0 \\.\votedsk1
located 1 votedisk(s).
Display OCR (Oracle Cluster Registry) information
C:\>ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 113568
Used space (kbytes) : 3784
Available space (kbytes) : 109784
ID : 1907135343
Device/File Name : \\.\ocrcfg
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
Check Status of RAC
C:\>srvctl config database -d RACDB
rac1 RACDB1 C:\oracle\product\10.2.0\db_1
rac2 RACDB2 C:\oracle\product\10.2.0\db_1
C:\>srvctl status database -d RACDB
Instance RACDB1 is running on node rac1
Instance RACDB2 is running on node rac2
Display instances
SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 RAC1:racdb1
2 RAC2:racdb2
SQL> show parameter cluster_database
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
SQL> select instance_name, status, startup_time, instance_role from gv$instance;
INSTANCE_NAME STATUS STARTUP_T INSTANCE_ROLE
---------------- ------------ --------- ------------------
racdb1 OPEN 12-JUN-08 PRIMARY_INSTANCE
racdb2 OPEN 12-JUN-08 PRIMARY_INSTANCE
Check the VIP config
C:\>srvctl config nodeapps -h
Usage: srvctl config nodeapps -n <node_name> [-a] [-g] [-o] [-s] [-l]
-n <node> Node name
-a Display VIP configuration
-g Display GSD configuration
-s Display ONS daemon configuration
-l Display listener configuration
-h Print usage
C:\>srvctl config nodeapps -n rac1 -a
VIP exists.: /rac1-vip.localdomain/192.168.1.111/255.255.255.0/PUBLIC
C:\>srvctl config nodeapps -n rac1 -a -g -s -l
VIP exists.: /rac1-vip.localdomain/192.168.1.111/255.255.255.0/PUBLIC
GSD exists.
ONS daemon exists.
Listener exists.
C:\>srvctl status nodeapps -n rac2
VIP is running on node: rac2
GSD is running on node: rac2
Listener is running on node: rac2
ONS daemon is running on node: rac2
Change the VIP address, subnetmask or interface
srvctl stop nodeapps -n <node1>
srvctl stop nodeapps -n <node2>
srvctl modify nodeapps -n <node1> -A <ip_address>/<net mask>/<interface>
srvctl modify nodeapps -n <node2> -A <ip_address>/<net mask>/<interface>
srvctl start nodeapps -n <node1>
srvctl start nodeapps -n <node2>
To prevent a database starting at boot time
srvctl disable database -d <database name>
Change the private interconnect subnet
First find the interface which is in use as the interconnect – run as root from the crs home:
oifcfg getif
Make a note of the interface name (eth1 in the following example), then
run the following:
oifcfg delif -global eth1
oifcfg setif -global eth1/<your new subnet>:cluster_interconnect