昨天,oracle11gR2出现问题,crs_stat -t看不对instance的相关信息,网上查了一下,原来Oracle 11gR2 crs_stat 命令不再显示instance信息,网上找了一篇文章有帮助(Microjoey的:http://blog.csdn.net/microjoey/article/details/7438658),备查
Oracle 11gR2 crs_stat 命令不再显示instance信息
1.crs_stat 不再显示database instance的信息
从Oracle 11gV2开始,crs_stat 已经被deprecated(crs_*命令被crsctl 替代),不再显示database instance的信息。为了得到instance的信息,需要使用crsctl命令或者srvclt命令。
- [crsusr@MicroJoey05 ~]$ crs_stat -t
- Name Type Target State Host
- ------------------------------------------------------------
- ora....0405.dg ora....up.type ONLINE ONLINE MicroJoey05
- ora....ER.lsnr ora....er.type ONLINE ONLINE MicroJoey05
- ora....N1.lsnr ora....er.type ONLINE ONLINE MicroJoey05
- ora....N2.lsnr ora....er.type ONLINE ONLINE MicroJoey08
- ora....N3.lsnr ora....er.type ONLINE ONLINE MicroJoey07
- ora....0405.dg ora....up.type ONLINE ONLINE MicroJoey05
- ora.asm ora.asm.type ONLINE ONLINE MicroJoey05
- ora.cvu ora.cvu.type ONLINE ONLINE MicroJoey05
- ora.gsd ora.gsd.type OFFLINE OFFLINE
- ora....network ora....rk.type ONLINE ONLINE MicroJoey05
- ora.oc4j ora.oc4j.type ONLINE ONLINE MicroJoey07
- ora.ons ora.ons.type ONLINE ONLINE MicroJoey05
- ora.racstr.db ora....se.type ONLINE ONLINE MicroJoey05
- ora....r.n.svc ora....ce.type ONLINE ONLINE MicroJoey07
- ora....SM1.asm application ONLINE ONLINE MicroJoey05
- ora....05.lsnr application ONLINE ONLINE MicroJoey05
- ora....m05.gsd application OFFLINE OFFLINE
- ora....m05.ons application ONLINE ONLINE MicroJoey05
- ora....m05.vip ora....t1.type ONLINE ONLINE MicroJoey05
- ora....SM2.asm application ONLINE ONLINE MicroJoey06
- ora....06.lsnr application ONLINE ONLINE MicroJoey06
- ora....m06.gsd application OFFLINE OFFLINE
- ora....m06.ons application ONLINE ONLINE MicroJoey06
- ora....m06.vip ora....t1.type ONLINE ONLINE MicroJoey06
- ora....SM3.asm application ONLINE ONLINE MicroJoey07
- ora....07.lsnr application ONLINE ONLINE MicroJoey07
- ora....m07.gsd application OFFLINE OFFLINE
- ora....m07.ons application ONLINE ONLINE MicroJoey07
- ora....m07.vip ora....t1.type ONLINE ONLINE MicroJoey07
- ora....SM4.asm application ONLINE ONLINE MicroJoey08
- ora....08.lsnr application ONLINE ONLINE MicroJoey08
- ora....m08.gsd application OFFLINE OFFLINE
- ora....m08.ons application ONLINE ONLINE MicroJoey08
- ora....m08.vip ora....t1.type ONLINE ONLINE MicroJoey08
- ora.scan1.vip ora....ip.type ONLINE ONLINE MicroJoey05
- ora.scan2.vip ora....ip.type ONLINE ONLINE MicroJoey08
- ora.scan3.vip ora....ip.type ONLINE ONLINE MicroJoey07
by the way,gsd从11gR2默认是offline状态,如果在cluster中没有9i数据库,该服务建议offline。
Global Services Daemon (GSD)
A component that receives requests from SRVCTL to execute administrative job tasks, such as startup or shutdown. The command is executed locally on each node, and the results are returned to SRVCTL. GSD is installed on the nodes by default.
- [crsusr@MicroJoey07 trace]$ srvctl status database -d racstr
- Instance racstr1 is running on node MicroJoey05
- Instance racstr2 is running on node MicroJoey06
- Instance racstr3 is running on node MicroJoey07
- Instance racstr4 is running on node MicroJoey08
3, 使用srvctl命令获得instance信息
- [crsusr@MicroJoey05 ~]$ crsctl stat res -t
- --------------------------------------------------------------------------------
- Name Target State Server State details
- --------------------------------------------------------------------------------
- Local Resources
- --------------------------------------------------------------------------------
- ora.DATA0405.dg
- ONLINE ONLINE MicroJoey05 STABLE
- ONLINE ONLINE MicroJoey06 STABLE
- ONLINE ONLINE MicroJoey07 STABLE
- ONLINE ONLINE MicroJoey08 STABLE
- ora.LISTENER.lsnr
- ONLINE ONLINE MicroJoey05 STABLE
- ONLINE ONLINE MicroJoey06 STABLE
- ONLINE ONLINE MicroJoey07 STABLE
- ONLINE ONLINE MicroJoey08 STABLE
- ora.ORCR0405.dg
- ONLINE ONLINE MicroJoey05 STABLE
- ONLINE ONLINE MicroJoey06 STABLE
- ONLINE ONLINE MicroJoey07 STABLE
- ONLINE ONLINE MicroJoey08 STABLE
- ora.asm
- ONLINE ONLINE MicroJoey05 Started,STABLE
- ONLINE ONLINE MicroJoey06 Started,STABLE
- ONLINE ONLINE MicroJoey07 Started,STABLE
- ONLINE ONLINE MicroJoey08 Started,STABLE
- ora.gsd
- OFFLINE OFFLINE MicroJoey05 STABLE
- OFFLINE OFFLINE MicroJoey06 STABLE
- OFFLINE OFFLINE MicroJoey07 STABLE
- OFFLINE OFFLINE MicroJoey08 STABLE
- ora.net1.network
- ONLINE ONLINE MicroJoey05 STABLE
- ONLINE ONLINE MicroJoey06 STABLE
- ONLINE ONLINE MicroJoey07 STABLE
- ONLINE ONLINE MicroJoey08 STABLE
- ora.ons
- ONLINE ONLINE MicroJoey05 STABLE
- ONLINE ONLINE MicroJoey06 STABLE
- ONLINE ONLINE MicroJoey07 STABLE
- ONLINE ONLINE MicroJoey08 STABLE
- --------------------------------------------------------------------------------
- Cluster Resources
- --------------------------------------------------------------------------------
- ora.LISTENER_SCAN1.lsnr
- 1 ONLINE ONLINE MicroJoey05 STABLE
- ora.LISTENER_SCAN2.lsnr
- 1 ONLINE ONLINE MicroJoey08 STABLE
- ora.LISTENER_SCAN3.lsnr
- 1 ONLINE ONLINE MicroJoey07 STABLE
- ora.cvu
- 1 ONLINE ONLINE MicroJoey05 STABLE
- ora.oc4j
- 1 ONLINE ONLINE MicroJoey07 STABLE
- ora.racstr.db
- 1 ONLINE ONLINE MicroJoey05 Open,STABLE
- 2 ONLINE ONLINE MicroJoey06 Open,STABLE
- 3 ONLINE ONLINE MicroJoey07 Open,STABLE
- 4 ONLINE ONLINE MicroJoey08 Open,STABLE
- ora.racstr.n.svc
- 1 ONLINE ONLINE MicroJoey07 STABLE
- ora.MicroJoey05.vip
- 1 ONLINE ONLINE MicroJoey05 STABLE
- ora.MicroJoey06.vip
- 1 ONLINE ONLINE MicroJoey06 STABLE
- ora.MicroJoey07.vip
- 1 ONLINE ONLINE MicroJoey07 STABLE
- ora.MicroJoey08.vip
- 1 ONLINE ONLINE MicroJoey08 STABLE
- ora.scan1.vip
- 1 ONLINE ONLINE MicroJoey05 STABLE
- ora.scan2.vip
- 1 ONLINE ONLINE MicroJoey08 STABLE
- ora.scan3.vip
- 1 ONLINE ONLINE MicroJoey07 STABLE
- --------------------------------------------------------------------------------
ATTENTION:
The following commands are deprecated in Oracle Clusterware 11g release 2 (11.2):
crs_stat
crs_register
crs_unregister
crs_start
crs_stop
crs_getperm
crs_profile
crs_relocate
crs_setperm
crsctl check crsd
crsctl check cssd
crsctl check evmd
crsctl debug log
crsctl set css votedisk
crsctl start resources
crsctl stop resources