[root@felix2 bin]# ./srvctl config database -dfelix
felix1 felix1 /u01/oracle/10.2.0/db_1
felix2 felix2 /u01/oracle/10.2.0/db_1
[root@felix2 bin]#
[root@felix2 bin]# ./srvctl config database -dfelix -a
felix1 felix1 /u01/oracle/10.2.0/db_1
felix2 felix2 /u01/oracle/10.2.0/db_1
DB_UNIQUE_NAME: felix
DB_NAME: null
ORACLE_HOME: /u01/oracle/10.2.0/db_1
SPFILE: +DATA/felix/spfilefelix.ora
DOMAIN: null
DB_ROLE: null
START_OPTIONS: null
POLICY: AUTOMATIC
ENABLE FLAG: DB ENABLED
[root@felix2 bin]#
2.查看node Application的配置
[root@felix2 bin]# ./srvctl config nodeapps -nfelix
PRKC-1056 : Failed to get the hostname for nodefelix
PRKH-1001 : HASContext Internal Error
[OCRError(Native: getHostName:[21])]
[root@felix2 bin]# ./srvctl config nodeapps -nfelix1
felix1 felix1 /u01/oracle/10.2.0/db_1
[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -h
Usage: srvctl config nodeapps -n
-n
-a Display VIP configuration
-g Display GSD configuration
-s Display ONS daemonconfiguration
-l Display listenerconfiguration
-h Print usage
[root@felix2 bin]#
[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -a
VIP exists.:/felix1-vip/192.168.10.111/255.255.255.0/eth0
[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -g
GSD exists.
[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -s
ONS daemon exists.
[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -l
Listener exists.
3.产看监听状态
[root@felix2 bin]# ./srvctl config listener -nfelix1
felix1 LISTENER_FELIX1
4.查看ASM
[root@felix2 bin]# ./srvctl config asm -n felix2
+ASM2 /u01/oracle/10.2.0/db_1
[root@felix2 bin]#
5.查看service
[root@felix2 bin]# ./srvctl config service -h
Usage: srvctl config service -d
-d
-s
-a Additional attributes
-S
-h Print usage
[root@felix2 bin]#
使用add添加对象:
一般情况下,应用层的资源都是在图形化界面的帮助下注册到OCR中,比如VIP、ONS是在安装最后阶段创建的,而数据库、ASM是在执行DBCA的过程中自动注册到OCR中,LISTENER是通过NETCA工具。有写时候需要手工把资源注册到OCR中,这事就用到了add命令。
[root@felix1 bin]# ./srvctl -h
Usage: srvctl [-V]
Usage: srvctl add database -d
Usage: srvctl add instance -d
Usage: srvctl add service -d
Usage: srvctl add service -d
Usage: srvctl add nodeapps -n
Usage: srvctl add asm -n
Usage: srvctl config database
Usage: srvctl config database -d
Usage: srvctl config service -d
Usage: srvctl config nodeapps -n
Usage: srvctl config asm -n
Usage: srvctl config listener -n
Usage: srvctl disable database -d
Usage: srvctl disable instance -d
Usage: srvctl disable service -d
Usage: srvctl disable asm -n
Usage: srvctl enable database -d
Usage: srvctl enable instance -d
Usage: srvctl enable service -d
Usage: srvctl enable asm -n
Usage: srvctl getenv database -d
Usage: srvctl getenv instance -d
Usage: srvctl getenv service -d
Usage: srvctl getenv nodeapps -n
Usage: srvctl modify database -d
Usage: srvctl modify instance -d
Usage: srvctl modify instance -d
Usage: srvctl m