您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > RAC常见命令检查状态
RAC常见命令检查状态1.2.1检查集群状态[grid@rac1~]$crsctlcheckclusterCRS-4537:ClusterReadyServicesisonlineCRS-4529:ClusterSynchronizationServicesisonlineCRS-4533:EventManagerisonline1.2.2所有Oracle实例(数据库状态)[grid@rac1~]$srvctlstatusdatabase-dsddInstancesdd1isrunningonnoderac1Instancesdd2isrunningonnoderac21.2.3检查单个实例状态[grid@rac1~]$srvctlstatusinstance-dsdd-isdd1Instancesdd1isrunningonnoderac1[grid@rac1~]$1.2.4节点应用程序状态[grid@rac1~]$srvctlstatusnodeappsVIPrac1-vipisenabledVIPrac1-vipisrunningonnode:rac1VIPrac2-vipisenabledVIPrac2-vipisrunningonnode:rac2NetworkisenabledNetworkisrunningonnode:rac1Networkisrunningonnode:rac2GSDisdisabledGSDisnotrunningonnode:rac1GSDisnotrunningonnode:rac2ONSisenabledONSdaemonisrunningonnode:rac1ONSdaemonisrunningonnode:rac21.2.5列出所有的配置数据库[grid@rac1~]$srvctlconfigdatabasesdd1.2.6数据库配置[grid@rac1~]$srvctlconfigdatabase-dsdd-aDatabaseuniquename:sddDatabasename:sddOraclehome:/u01/app/oracle/11.2.0/db_1Oracleuser:oracleSpfile:+DATA/sdd/spfilesdd.oraDomain:Startoptions:openStopoptions:immediateDatabaserole:PRIMARYManagementpolicy:AUTOMATICServerpools:sddDatabaseinstances:sdd1,sdd2DiskGroups:DATA,FRAMountpointpaths:Services:Type:RACDatabaseisenabledDatabaseisadministratormanaged1.2.7ASM状态以及ASM配置[grid@rac1~]$srvctlstatusasmASMisrunningonrac2,rac1[grid@rac1~]$srvctlstatusasm-aASMisrunningonrac2,rac1ASMisenabled.1.2.8TNS监听器状态以及配置[grid@rac1~]$srvctlstatuslistenerListenerLISTENERisenabledListenerLISTENERisrunningonnode(s):rac2,rac1[grid@rac1~]$srvctlconfiglistener-aName:LISTENERNetwork:1,Owner:gridHome:/u01/app/grid/11.2.0onnode(s)rac2,rac1Endpoints:TCP:15211.2.9SCAN状态以及配置[grid@rac1~]$srvctlstatusscanSCANVIPscan1isenabledSCANVIPscan1isrunningonnoderac1[grid@rac1~]$srvctlconfigscanSCANname:rac-scan,Network:1/192.168.16.0/255.255.255.0/eth0SCANVIPname:scan1,IP:/rac-scan/192.168.16.2071.2.10VIP各个节点的状态以及配置[grid@rac1~]$srvctlstatusvip-nrac1VIPrac1-vipisenabledVIPrac1-vipisrunningonnode:rac1[grid@rac1~]$srvctlstatusvip-nrac2VIPrac2-vipisenabledVIPrac2-vipisrunningonnode:rac2[grid@rac1~]$srvctlconfigvip-nrac1VIPexists:/rac1-vip/192.168.16.201/192.168.16.0/255.255.255.0/eth0,hostingnoderac1[grid@rac1~]$srvctlconfigvip-nrac2VIPexists:/rac2-vip/192.168.16.203/192.168.16.0/255.255.255.0/eth0,hostingnoderac2[grid@rac1~]$1.2.11节点应用程序配置(VIP、GSD、ONS、监听器)[grid@rac1~]$srvctlconfignodeapps-a-g-s-lWarning:-loptionhasbeendeprecatedandwillbeignored.Networkexists:1/192.168.16.0/255.255.255.0/eth0,typestaticVIPexists:/rac1-vip/192.168.16.201/192.168.16.0/255.255.255.0/eth0,hostingnoderac1VIPexists:/rac2-vip/192.168.16.203/192.168.16.0/255.255.255.0/eth0,hostingnoderac2GSDexistsONSexists:Localport6100,remoteport6200,EMport2016Name:LISTENERNetwork:1,Owner:gridHome:/u01/app/grid/11.2.0onnode(s)rac2,rac1Endpoints:TCP:15211.3语法简汇1.3.1数据库与实例srvctlconfigdatabase#列出安装的数据库srvctlconfigdatabase-drac-a#检查数据库相关的信息srvctlstatusdatabase-dRAC#检查数据库的状态srvctlstatusinstance-dRAC-irac1#检查指定实例的状态srvctlconfigasm-a#ASM配置srvctlstatusasm#ASM的状态srvctlstartdatabase-drac#启动数据库srvctlstopdatabase-drac#关闭数据库srvctlstartinstance-drac-irac1#启动指定的实例srvctlstopinstance-drac-irac2#关闭指定实例1.3.2网络相关的命令srvctlstatuslistener#检查TNSlistener的状态srvctlconfigscan#SCAN的配置srvctlstatusscan#SCANlistener状态,包含当前运行节点的信息#检查VIP的配置及状态srvctlstatusvip-nrac1srvctlconfigvip-nrac11.3.3查看各资源状态(nodeapps节点应用程序,ASM实例,数据库等)[root@db02u01]#crs_stat-tNameTypeTargetStateHost------------------------------------------------------------ora.DATA.dgora....up.typeONLINEONLINEdb02ora.FRA.dgora....up.typeONLINEONLINEdb02ora....ER.lsnrora....er.typeONLINEONLINEdb02ora....N1.lsnrora....er.typeONLINEONLINEdb02ora....N2.lsnrora....er.typeONLINEONLINEdb02ora....N3.lsnrora....er.typeONLINEONLINEdb02ora.OCR.dgora....up.typeONLINEONLINEdb02ora.asmora.asm.typeONLINEONLINEdb02ora....-01.vipora....t1.typeONLINEONLINEdb02ora....SM2.asmapplicationONLINEONLINEdb02ora....02.lsnrapplicationONLINEONLINEdb02ora....-02.gsdapplicationOFFLINEOFFLINEora....-02.onsapplicationONLINEONLINEdb02ora....-02.vipora....t1.typeONLINEONLINEdb02ora.cvuora.cvu.typeONLINEONLINEdb02ora.gsdora.gsd.typeOFFLINEOFFLINEora....networkora....rk.typeONLINEONLINEdb02ora.oc4jora.oc4j.typeONLINEONLINEdb02ora.onsora.ons.typeONLINEONLINEdb02ora.orcl.dbora....se.typeONLINEONLINEdb02ora....taf.svcora....ce.typeONLINEONLINEdb02ora.scan1.vipora....ip.typeONLINEONLINEdb02ora.scan2.vipora....ip.typeONLINEONLINEdb02ora.scan3.vipora....ip.typeONLINEONLINEdb02在11gR2中,默认oc4j和gsd资源是disable的;oc4j是用于WLM的一个资源,WLM在11.2.0.2才可用;gsd是CRS用于跟9iRAC进行通信的一个模块,是为了向后兼容才保留的,不影响性能;建议不要刪除,也不要尝试开启他们,忽略即可。ora.gsdisOFFLINEbydefaultifthereisno9idatabaseinthecluster.ora.oc4jisOFFLINEin11.2.0.1asDatabaseWorkloadManagement(DBWLM)isunavailable.thesecanbeignoredin11gR2RAC.状态检查也可以使用如下命令:crsctlstatresource–t或者crsctlstatresource更多内容参考:Oracle11gR2RAC进程说明综合1、通过SRVCTL命令来start/stop/check所有的实例:srvctlstart|stop|statusdatabase-d2、start/stop指定的实例:srvctlstart|stop|statusinstance-d-i3、列出当前RAC下所有的srvctlconfigdatabase-d4、start/stop/check所有的nodeapps,比如:V
本文标题:RAC常见命令检查状态
链接地址:https://www.777doc.com/doc-1497662 .html