您的位置:首页 > 其它

RAC常用管理命令--查询RAC集群各种信息命令-更新中

2013-10-27 20:14 337 查看
1.查询RAC集群各种信息命令

数据库名:bysrac

实例名:bysrac1  bysrac1
查集群状态:

[grid@bysrac1 crsd]$ crsctl check cluster

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

[grid@bysrac1 ~]$ crsctl check crs

CRS-4638: Oracle High Availability Services is online

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

查所有节点实例是否启动:

[grid@bysrac1 crsd]$ srvctl status database -d bysrac

Instance bysrac1 is running on node bysrac1
Instance bysrac2 is running on node bysrac2

集群中所有正在运行的实例 — (SQL语句):

SELECT inst_id , instance_number inst_no , instance_name inst_name , parallel , status ,database_status db_status , active_state state , host_name host FROM gv$instance ORDER BY inst_id;

查单个节点实例是否启动:

[grid@bysrac1 crsd]$ srvctl status instance -d bysrac -i bysrac1

Instance bysrac1 is running on node bysrac1
查节点应用程序状态:

[grid@bysrac1 crsd]$ srvctl status nodeapps

VIP bysrac1-vip is enabled

VIP bysrac1-vip is running on node: bysrac1

VIP bysrac2-vip is enabled

VIP bysrac2-vip is running on node: bysrac2

Network is enabled

Network is running on node: bysrac1

Network is running on node: bysrac2

GSD is disabled

GSD is not running on node: bysrac1

GSD is not running on node: bysrac2

ONS is enabled

ONS daemon is running on node: bysrac1

ONS daemon is running on node: bysrac2

eONS is enabled

eONS daemon is running on node: bysrac1

eONS daemon is running on node: bysrac2
列出所配置的数据库名:

[grid@bysrac1 ~]$ srvctl config database

bysrac
列出所配置的数据库的详细信息:

[grid@bysrac1 ~]$ srvctl config database -d bysrac -a

Database unique name: bysrac

Database name: bysrac

Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1

Oracle user: oracle

Spfile: +BYSASMDATA/bysrac/spfilebysrac.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: bysrac

Database instances: bysrac1,bysrac2

Disk Groups: BYSASMDATA,BYSASMDG

Services:

Database is enabled

Database is administrator managed

查看ASM磁盘

[grid@bysrac1 crsd]$ srvctl status asm

ASM is running on bysrac1,bysrac2

[grid@bysrac1 crsd]$ srvctl config asm -a

ASM home: /g01/app/11.2.0/grid

ASM listener: LISTENER

ASM is enabled.
查看listener

[grid@bysrac1 crsd]$ srvctl status listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s): bysrac1,bysrac2

[grid@bysrac1 crsd]$ srvctl config listener -a

Name: LISTENER

Network: 1, Owner: grid

Home: <CRS home>

  /g01/app/11.2.0/grid on node(s) bysrac2,bysrac1

查看各资源状态(nodeapps节点应用程序,ASM实例,数据库等)

状态检查可以用以下三个命令:

crsctl stat resource –t

或者
crsctl stat resource

[grid@bysrac1 ~]$ crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....MBAK.dg ora....up.type ONLINE    ONLINE    bysrac1     

ora....DATA.dg ora....up.type ONLINE    ONLINE    bysrac1     

ora....SMDG.dg ora....up.type ONLINE    ONLINE    bysrac1     

ora....ER.lsnr ora....er.type ONLINE    ONLINE    bysrac1     

ora....N1.lsnr ora....er.type ONLINE    ONLINE    bysrac1     

ora.asm        ora.asm.type   ONLINE    ONLINE    bysrac1     

ora.bysrac.db  ora....se.type ONLINE    ONLINE    bysrac1     

ora....SM1.asm application    ONLINE    ONLINE    bysrac1     

ora....C1.lsnr application    ONLINE    ONLINE    bysrac1     

ora....ac1.gsd application    OFFLINE   OFFLINE               

ora....ac1.ons application    ONLINE    ONLINE    bysrac1     

ora....ac1.vip ora....t1.type ONLINE    ONLINE    bysrac1     

ora....SM2.asm application    ONLINE    ONLINE    bysrac2     

ora....C2.lsnr application    ONLINE    ONLINE    bysrac2     

ora....ac2.gsd application    OFFLINE   OFFLINE               

ora....ac2.ons application    ONLINE    ONLINE    bysrac2     

ora....ac2.vip ora....t1.type ONLINE    ONLINE    bysrac2     

ora.eons       ora.eons.type  ONLINE    ONLINE    bysrac1     
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               

ora....network ora....rk.type ONLINE    ONLINE    bysrac1     
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE               

ora.ons        ora.ons.type   ONLINE    ONLINE    bysrac1     

ora.scan1.vip  ora....ip.type ONLINE    ONLINE    bysrac1  
在11g R2中,默认 oc4j和gsd资源是 disable的;oc4j 是用于WLM 的一个资源, WLM在 11.2.0.2 才可用;

gsd是 CRS 用于跟 9i RAC 进行通信的一个模块,是为了向后兼容才保留的,不影响性能;建议不要刪除, 也不要尝试开启他们, 忽略即可。

时钟同步   验证所有集群节点间的时钟同步:

 [grid@rac02 ~]$ cluvfy comp clocksync -verbose
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: