节点层:osnodes
网络层:oifcfg
集群层:crsctl, ocrcheck,ocrdump,ocrconfig
应用层:srvctl,onsctl,crs_stat
root:
checkcrsctl check has [-f]
crsctl check cluster
crsctl check crs
ocrcheck
stop
crsctl stop crs
crsctl stop has -f
start
crsctl stat res -t
crsctl start crs -excl -nocrs
crsctl start resource ora.cssd
query
crsctl query css votedisk
config
ocrconfig -restore /g01/11.2.0/grid/cdata/vrh-cluster/backup00.ocr
crsctl replace votedisk +systemdg
grid:
crs_stat -tcrsctl modify resource "ora.cssd" -attr "AUTO_START=1"
srvctl config database -d xxx -a
srvctl status nodeapps
srvctl status listener
srvctl status listener -a
srvctl status scan
oracle:
$ srvctl start -hsrvctl status database -d xxx
注意
crsctl stop resources 只停止了所操作节点的CRS resources,但是crs的相关进程并未停止
crsctl stop crs 不但停止了所操作节点的CRS resources,crs的相关进程也停止
用法: srvctl add service -d <name> -s <service_name> -u {-r "<new_pref_inst>" | -a "<new_avail_inst>"}
用法: srvctl add nodeapps -n <node_name> -o <oracle_home> -A <name|ip>/netmask[/if1[|if2|...]]
用法: srvctl add asm -n <node_name> -i <asm_inst_name> -o <oracle_home> [-p <spfile>]
用法: srvctl config database
用法: srvctl config database -d <name> [-a] [-t]
用法: srvctl config service -d <name> [-s <service_name>] [-a] [-S <level>]
用法: srvctl config nodeapps -n <node_name> [-a] [-g] [-o] [-s] [-l]
用法: srvctl config asm -n <node_name>
用法: srvctl config listener -n <node_name>
用法: srvctl disable database -d <name>
用法: srvctl disable instance -d <name> -i "<inst_name_list>"
用法: srvctl disable service -d <name> -s "<service_name_list>" [-i <inst_name>]
用法: srvctl disable asm -n <node_name> [-i <inst_name>]
用法: srvctl enable database -d <name>
用法: srvctl enable instance -d <name> -i "<inst_name_list>"
用法: srvctl enable service -d <name> -s "<service_name_list>" [-i <inst_name>]
用法: srvctl enable asm -n <node_name> [-i <inst_name>]
用法: srvctl getenv database -d <name> [-t "<name_list>"]
用法: srvctl getenv instance -d <name> -i <inst_name> [-t "<name_list>"]
用法: srvctl getenv service -d <name> -s <service_name> [-t "<name_list>"]
用法: srvctl getenv nodeapps -n <node_name> [-t "<name_list>"]
用法: srvctl modify database -d <name> [-n <db_name] [-o <ohome>] [-m <domain>] [-p <spfile>] [-r {PRIMARY |
用法: srvctl modify instance -d <name> -i <inst_name> -n <node_name>
用法: srvctl modify instance -d <name> -i <inst_name> {-s <asm_inst_name> | -r}
用法: srvctl modify service -d <name> -s <service_name> -i <old_inst_name> -t <new_inst_name> [-f]
用法: srvctl modify service -d <name> -s <service_name> -i <avail_inst_name> -r [-f]
用法: srvctl modify service -d <name> -s <service_name> -n -i <prefered_inst> [-a <available_list>] [-f]
用法: srvctl modify asm -n <node_name> -i <asm_inst_name> [-o <oracle_home>] [-p <spfile>]
用法: srvctl relocate service -d <name> -s <service_name> -i <old_inst_name> -t <new_inst_name> [-f]
用法: srvctl remove database -d <name> [-f]
用法: srvctl remove instance -d <name> -i <inst_name> [-f]
用法: srvctl remove service -d <name> -s <service_name> [-i <inst_name>] [-f]
用法: srvctl remove nodeapps -n "<node_name_list>" [-f]
用法: srvctl remove asm -n <node_name> [-i <asm_inst_name>] [-f]
用法: srvctl setenv database -d <name> {-t <name>=<val>[,<name>=<val>,...] | -T <name>=<val>}
用法: srvctl setenv instance -d <name> [-i <inst_name>] {-t "<name>=<val>[,<name>=<val>,...]" | -T "<name>=<val>"}
用法: srvctl setenv service -d <name> [-s <service_name>] {-t "<name>=<val>[,<name>=<val>,...]" | -T
用法: srvctl setenv nodeapps -n <node_name> {-t "<name>=<val>[,<name>=<val>,...]" | -T "<name>=<val>"}
用法: srvctl start database -d <name> [-o <start_options>] [-c <connect_str> | -q]
用法: srvctl start instance -d <name> -i "<inst_name_list>" [-o <start_options>] [-c <connect_str> | -q]
用法: srvctl start service -d <name> [-s "<service_name_list>" [-i <inst_name>]] [-o <start_options>] [-c
用法: srvctl start nodeapps -n <node_name>
用法: srvctl start asm -n <node_name> [-i <asm_inst_name>] [-o <start_options>] [-c <connect_str> | -q]
用法: srvctl start listener -n <node_name> [-l <lsnr_name_list>]
用法: srvctl status database -d <name> [-f] [-v] [-S <level>]
用法: srvctl status instance -d <name> -i "<inst_name_list>" [-f] [-v] [-S <level>]
用法: srvctl status service -d <name> [-s "<service_name_list>"] [-f] [-v] [-S <level>]
用法: srvctl status nodeapps -n <node_name>
用法: srvctl status asm -n <node_name>
用法: srvctl stop database -d <name> [-o <stop_options>] [-c <connect_str> | -q]
用法: srvctl stop instance -d <name> -i "<inst_name_list>" [-o <stop_options>] [-c <connect_str> | -q]
用法: srvctl stop service -d <name> [-s "<service_name_list>" [-i <inst_name>]] [-c <connect_str> | -q] [-f]
用法: srvctl stop nodeapps -n <node_name>
用法: srvctl stop asm -n <node_name> [-i <asm_inst_name>] [-o <stop_options>] [-c <connect_str> | -q]
用法: srvctl stop listener -n <node_name> [-l <lsnr_name_list>]
用法: srvctl unsetenv database -d <name> -t "<name_list>"
用法: srvctl unsetenv instance -d <name> [-i <inst_name>] -t "<name_list>"
用法: srvctl unsetenv service -d <name> [-s <service_name>] -t "<name_list>"
用法: srvctl unsetenv nodeapps -n <node_name> -t "<name_list>"
======================================例如======================================================
[oracle@rac1 ~]$ srvctl status service -d rac -v Service ractest1 is running on instance(s) rac2 Service ractest2 is running on instance(s) rac2[oracle@rac1 trace]$ srvctl relocate service -d rac -s ractest1 -i rac2 -t rac1[oracle@rac1 trace]$ srvctl status service -d rac Service ractest1 is running on instance(s) rac1 Service ractest2 is running on instance(s) rac2