版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、常用的crs命令如下:$ORA_CRS_HOME/bin/crs_stat-t此命令主要用来检查crs资源状态例如oraclerac2css$ORA_CRS_HOME/bin/crs_stat-tNameTypeTargetStateHostoraCL1.srvapplicationONLINEONLINErac1oraCL2.srvapplicationONLINEONLINErac2oraTEST.csapplicationONLINEONLINErac1oraL1.instapplicationONLINEONLINErac1oraL2.instapplicationONLINEONLI
2、NErac2ora.ORCL.dbapplicationONLINEONLINErac1oraSM1.asmapplicationONLINEONLINErac1oraC1.lsnrapplicationONLINEONLINErac1ora.rac1.gsdapplicationONLINEONLINErac1ora.rac1.onsapplicationONLINEONLINErac1ora.rac1.vipapplicationONLINEONLINErac1oraSM2.asmapplicationONLINEONLINErac2oraC2.lsnrapplicationONLINEO
3、NLINErac2ora.rac2.gsdapplicationONLINEONLINErac2ora.rac2.onsapplicationONLINEONLINErac2ora.rac2.vipapplicationONLINEONLINErac2oraclerac2css$ORA_CRS_HOME/bin/crs_start-all此命令用来启动所有的集群服务,但是启动的前提是资源状态State不能是UNKNOWN。$ORA_CRS_HOME/bin/crs_start集群服务名(集群服务名可以通过$ORA_CRS_HOME/bin/crs_stat得到)$ORA_CRS_HOME/bi
4、n/crs_stop-all$ORA_CRS_HOME/bin/crs_stop集群服务名(集群服务名可以通过$ORA_CRS_HOME/bin/crs_stat得到)上面的一组crs命令是用来启动关闭crs服务的,下面通过一个真实的环境,具体讲解这些命令的使用。举例如下:OracleRAC在安装完毕后,重启RAC,一些服务不能启动,手动启动也没用。下面是系统自动启动以后的情况;oraclerac1$crs_stat-tNameTypeTargetStateHostoraCL1.srvapplicationONLINEUNKNOWNrac1oraCL2.srvapplicationONLINE
5、UNKNOWNrac2oraTEST.csapplicationONLINEUNKNOWNrac2oraL1.instapplicationONLINEOFFLINEoraL2.instapplicationONLINEOFFLINEora.ORCL.dbapplicationONLINEUNKNOWNrac1oraSM1.asmapplicationONLINEUNKNOWNrac1oraC1.lsnrapplicationONLINEUNKNOWNrac1ora.rac1.gsdapplicationONLINEUNKNOWNrac1ora.rac1.onsapplicationONLIN
6、EUNKNOWNrac1ora.rac1.vipapplicationONLINEONLINErac1oraSM2.asmapplicationONLINEUNKNOWNrac2oraC2.lsnrapplicationONLINEUNKNOWNrac2ora.rac2.gsdapplicationONLINEUNKNOWNrac2ora.rac2.onsapplicationONLINEUNKNOWNrac2ora.rac2.vipapplicationONLINEONLINErac2oraclerac1$可以看到,只有vip是能自动启动的!其它资源都处于UNKNOWN状态下。手工用srvc
7、tl启动试试!$srvctlstartnodeapps-nrac1CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.gsdhasplacementerror.CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.viphasplacementerror.CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.onshasplacementerr
8、or.CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.LISTENER_RAC1.lsnrhasplacementerror.测试crs:$crsctlcheckcrsCSSappearshealthyCRSappearshealthyEVMappearshealthyoraclerac1bin$crsctlstartresourcesStartingresources.SuccessfullystartedCRSresourcesoraclerac1bin$pwd/oracle/app/oracle/o
9、racle/product/10.2.0/crs/binoraclerac1bin$gsdctlstoporaclerac1bin$gsdctlstatusoraclerac1bin$./gsdctlstatusoraclerac1bin$gsdctlstartoraclerac1bin$srvctlstartnodeapps-nrac1CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.gsdhasplacementerror.CRS-1028:Dependencyanalysisfailedbecause
10、of:CRS-0223:Resourceora.rac1.viphasplacementerror.CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.onshasplacementerror.CRS-1028:Dependencyanalysisfailedbecauseof:CRS-0223:Resourceora.rac1.LISTENER_RAC1.lsnrhasplacementerror.oraclerac1$crs_stat-tNameTypeTargetStateHostoraCL1.srva
11、pplicationONLINEUNKNOWNrac1oraCL2.srvapplicationONLINEUNKNOWNrac2oraTEST.csapplicationONLINEUNKNOWNrac2oraL1.instapplicationONLINEOFFLINEoraL2.instapplicationONLINEOFFLINEora.ORCL.dbapplicationONLINEUNKNOWNrac1oraSM1.asmapplicationONLINEUNKNOWNrac1oraC1.lsnrapplicationONLINEUNKNOWNrac1ora.rac1.gsdap
12、plicationONLINEUNKNOWNrac1ora.rac1.onsapplicationONLINEUNKNOWNrac1ora.rac1.vipapplicationONLINEONLINErac1oraSM2.asmapplicationONLINEUNKNOWNrac2oraC2.lsnrapplicationONLINEUNKNOWNrac2ora.rac2.gsdapplicationONLINEUNKNOWNrac2ora.rac2.onsapplicationONLINEUNKNOWNrac2ora.rac2.vipapplicationONLINEONLINErac2
13、可以看到,仍然是启动后的原始状态。从上面的显示可以知道,每个资源的State显示为UNKNOWN,应该是由于两个节点时间不同步,进而造成crs在启动的时候无法认到系统已经注册的资源造成的。解决方法:首先,保证两个节点时间保持同步,ORACLE10gRAC两个节点之间有10几秒的时间误差,不会对应用造成影响。但是过分大的时间误差可能导致某个节点down机,或者节点不断重启。然后执行如下操作:oraclerac1$ORA_CRS_HOME/bin/crs_stop-allAttemptingtostopora.rac1.viponmemberraclAttemptingtostopora.rac2
14、.viponmemberrac2Stopofora.rac2.viponmemberrac2succeeded.Stopofora.rac1.viponmemberrac1succeeded.oraclerac1$ORA_CRS_HOME/bin/crs_stat-tNameTypeTargetStateHostoraCL1.srvapplicationONLINEUNKNOWNrac1oraCL2.srvapplicationONLINEUNKNOWNrac2oraTEST.csapplicationONLINEUNKNOWNrac2oraL1.instapplicationOFFLINEO
15、FFLINEoraL2.instapplicationOFFLINEOFFLINEora.ORCL.dbapplicationOFFLINEUNKNOWNrac1oraSM1.asmapplicationOFFLINEUNKNOWNrac1oraC1.lsnrapplicationOFFLINEUNKNOWNrac1ora.rac1.gsdapplicationONLINEUNKNOWNrac1ora.rac1.onsapplicationONLINEUNKNOWNrac1ora.rac1.vipapplicationOFFLINEOFFLINEoraSM2.asmapplicationOFF
16、LINEUNKNOWNrac2oraC2.lsnrapplicationOFFLINEUNKNOWNrac2ora.rac2.gsdapplicationONLINEUNKNOWNrac2ora.rac2.onsapplicationONLINEUNKNOWNrac2ora.rac2.vipapplicationOFFLINEOFFLINEoraclerac1$ORA_CRS_HOME/bin/crs_stat(此命令可以查看各个资源的完整服务名称)NAME=ora.ORCL.ORATEST.ORCL1.srvTYPE=applicationTARGET=OFFLINESTATE=OFFLIN
17、ENAME=ora.ORCL.ORATEST.ORCL2.srvTYPE=applicationTARGET=OFFLINESTATE=OFFLINENAME=ora.ORCL.ORATEST.csTYPE=applicationTARGET=ONLINESTATE=UNKNOWNonrac2NAME=ora.ORCL.ORCL1.instTYPE=applicationTARGET=OFFLINESTATE=OFFLINENAME=ora.ORCL.ORCL2.instTYPE=applicationTARGET=OFFLINESTATE=OFFLINENAME=ora.ORCL.dbTYP
18、E=applicationTARGET=OFFLINESTATE=OFFLINENAME=ora.rac1.ASM1.asmTYPE=applicationTARGET=OFFLINESTATE=UNKNOWNonrac1NAME=ora.rac1.LISTENER_RAC1.lsnrTYPE=applicationTARGET=OFFLINESTATE=UNKNOWNonrac1NAME=ora.rac1.gsdTYPE=applicationTARGET=ONLINESTATE=UNKNOWNonrac1NAME=ora.rac1.onsTYPE=applicationTARGET=ONL
19、INESTATE=UNKNOWNonrac1NAME=ora.rac1.vipTYPE=applicationTARGET=ONLINESTATE=UNKNOWNonrac1NAME=ora.rac2.ASM2.asmTYPE=applicationTARGET=OFFLINESTATE=OFFLINENAME=ora.rac2.LISTENER_RAC2.lsnrTYPE=applicationTARGET=OFFLINESTATE=OFFLINENAME=ora.rac2.gsdTYPE=applicationTARGET=ONLINESTATE=UNKNOWNonrac2NAME=ora
20、.rac2.onsTYPE=applicationTARGET=ONLINESTATE=UNKNOWNonrac2NAME=ora.rac2.vipTYPE=applicationTARGET=OFFLINESTATE=OFFLINE$ORA_CRS_HOME/bin/crs_stop-all只能停掉State为ONLINE的服务,状态为UNKNOWN的资源不能通过这个命令关闭,因此可以通过$ORA_CRS_HOME/bin/crs_stop服务名的方式单独停止那些状态为UNKNOWN的资源。下面是通过$ORA_CRS_HOME/bin/crs_stop命令依次停止资源状态State为UNKN
21、OWN的服务。oraclerac1$ORA_CRS_HOME/bin/crs_stopora.ORCL.ORATEST.csAttemptingtostopora.ORCL.ORATEST.esonmemberrac2Stopofora.ORCL.ORATEST.csonmemberrac2succeeded.oraclerac1$ORA_CRS_HOME/bin/crs_stopora.rac1.ASM1.asmAttemptingtostopora.rac1.ASM1.asmonmemberrac1Stopofora.rac1.ASM1.asmonmemberrac1succeeded.o
22、raclerac1$ORA_CRS_HOME/bin/crs_stopora.rac1.LISTENER_RAC1.lsnrAttemptingtostopora.rac1.LISTENER_RAC1.lsnronmemberrac1Stopofora.rac1.LISTENER_RAC1.lsnronmemberrac1succeeded.oraclerac1$ORA_CRS_HOME/bin/crs_stopora.rac1.onsAttemptingtostopora.rac1.onsonmemberraclStopofora.rac1.onsonmemberraclsucceeded.
23、oraclerac1$ORA_CRS_HOME/bin/crs_stopora.rac1.vipAttemptingtostopora.rac1.viponmemberrac1Stopofora.rac1.viponmemberrac1succeeded.oraclerac1$ORA_CRS_HOME/bin/crs_stopora.rac2.gsdAttemptingtostopora.rac2.gsdonmemberrac2Stopofora.rac2.gsdonmemberrac2succeeded.oraclerac1$ORA_CRS_HOME/bin/crs_stopora.rac2
24、.onsAttemptingtostopora.rac2.onsonmemberrac2Stopofora.rac2.onsonmemberrac2succeeded.oraclerac1$ORA_CRS_HOME/bin/crs_stopora.rac1.gsdAttemptingtostopora.rac1.gsdonmemberrac1Stopofora.rac1.gsdonmemberrac1succeeded.把所有状态为UNKNOWN的资源全部停止以后,再次查看资源状态:oraclerac1$ORA_CRS_HOME/bin/crs_stat-tNameTypeTargetStat
25、eHostoraCL1.srvapplicationOFFLINEOFFLINEoraCL2.srvapplicationOFFLINEOFFLINEoraTEST.csapplicationOFFLINEOFFLINEoraL1.instapplicationOFFLINEOFFLINEoraL2.instapplicationOFFLINEOFFLINEora.ORCL.dbapplicationOFFLINEOFFLINEoraSM1.asmapplicationOFFLINEOFFLINEoraC1.lsnrapplicationOFFLINEOFFLINEora.rac1.gsdap
26、plicationOFFLINEOFFLINEora.rac1.onsapplicationOFFLINEOFFLINEora.rac1.vipapplicationOFFLINEOFFLINEoraSM2.asmapplicationOFFLINEOFFLINEoraC2.lsnrapplicationOFFLINEOFFLINEora.rac2.gsdapplicationOFFLINEOFFLINEora.rac2.onsapplicationOFFLINEOFFLINEora.rac2.vipapplicationOFFLINEOFFLINE此时可以重启所有crs资源了oraclera
27、c1$ORA_CRS_HOME/bin/crs_start-all(注意,这里是在oracle用户下操作)Attemptingtostartora.rac1.viponmemberrac1Attemptingtostartora.rac2.viponmemberrac2Startofora.rac2.viponmemberrac2succeeded.Attemptingtostartora.rac2.ASM2.asmonmemberrac2Startofora.rac1.viponmemberrac1succeeded.Attemptingtostartora.rac1.ASM1.asmonm
28、emberrac1Startofora.rac2.ASM2.asmonmemberrac2succeeded.Attemptingtostartora.ORCL.ORCL2.instonmemberrac2Startofora.rac1.ASM1.asmonmemberrac1succeeded.Attemptingtostartora.ORCL.ORCL1.instonmemberrac1Startofora.ORCL.ORCL2.instonmemberrac2succeeded.Attemptingtostartora.rac2.LISTENER_RAC2.lsnronmemberrac
29、2Startofora.rac2.LISTENER_RAC2.lsnronmemberrac2succeeded.Startofora.ORCL.ORCL1.instonmemberrac1succeeded.Attemptingtostartora.rac1.LISTENER_RAC1.lsnronmemberrac1Startofora.rac1.LISTENER_RAC1.lsnronmemberrac1succeeded.Attemptingtostartora.ORCL.ORATEST.ORCL1.srvonmemberrac1CRS-1002:Resourceora.rac1.on
30、sisalreadyrunningonmemberrac1CRS-1002:Resourceora.ORCL.dbisalreadyrunningonmemberrac1CRS-1002:Resourceora.rac2.onsisalreadyrunningonmemberrac2Attemptingtostartora.ORCL.ORATEST.ORCL2.srvonmemberrac2Attemptingtostartora.ORCL.ORATEST.csonmemberrac2Attemptingtostartora.rac1.gsdonmemberrac1Attemptingtost
31、artora.rac2.gsdonmemberrac2Startofora.ORCL.ORATEST.csonmemberrac2succeeded.Startofora.rac2.gsdonmemberrac2succeeded.Startofora.ORCL.ORATEST.ORCL2.srvonmemberrac2succeeded.Startofora.rac1.gsdonmemberrac1succeeded.Startofora.ORCL.ORATEST.ORCL1.srvonmemberrac1succeeded.CRS-0223:Resourceora.ORCL.dbhaspl
32、acementerror.CRS-0223:Resourceora.rac1.onshasplacementerror.CRS-0223:Resourceora.rac2.onshasplacementerror.oraclerac1$crs_stat-tNameTypeTargetStateHostoraCL1.srvapplicationONLINEONLINErac1oraCL2.srvapplicationONLINEONLINErac2oraTEST.csapplicationONLINEONLINErac2oraL1.instapplicationONLINEONLINErac1o
33、raL2.instapplicationONLINEONLINErac2ora.ORCL.dbapplicationONLINEONLINErac1oraSM1.asmapplicationONLINEONLINErac1oraC1.lsnrapplicationONLINEONLINErac1ora.rac1.gsdapplicationONLINEONLINErac1ora.rac1.onsapplicationONLINEONLINErac1ora.rac1.vipapplicationONLINEONLINErac1oraSM2.asmapplicationONLINEONLINEra
34、c2oraC2.lsnrapplicationONLINEONLINErac2ora.rac2.gsdapplicationONLINEONLINErac2ora.rac2.onsapplicationONLINEONLINErac2ora.rac2.vipapplicationONLINEONLINErac2此时,看到crs所有资源全部启动,问题解决。其它一些常用命令:$ORA_CRS_HOME/bin/crsctlcheckcrs用于检查后台进程状态$ORA_CRS_HOME/bin/crsctlstartresources启动crs资源$ORA_CRS_HOME/bin/crsctlstartcrs启动crs,需要超级用户操作。$ORA_CRS_HOME/bin/crsctlstopcrs关闭crs,需要超级用户操作。$ORA_CRS_HOME/bin/crs_unregister取消注册crs$ORA_CRS_HOME/bin/ocrcheck检查ocr设置信息用ocrcheck$ORA_CRS_HOME/bin/crsctlquerycssvotedisk检查表决磁盘信息举例:oraclerac2css$ocrcheckStatusofOracleClusterRegistryisasfollows:Version:2Tot
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024环保教案:牧羊人植树故事的新解读
- 2024年BIM技术在环保设施中的应用
- 2024年《画漫画》课程:开启学生的创意之旅
- 十一月执业医师资格公共卫生执业医师综合训练卷(附答案)
- 2024年《咏鹅》陶艺作品创作指南
- 2024年《垃圾分类》教案-环保小卫士在行动
- 地球的圈层结构教案
- 2024-2025学年八年级英语下册Unit8SaveOurWorldLesson43LetsCleanUp课时作业新版冀教版
- 2025版高考英语一轮复习必修3Unit9Wheels学案北师大版
- 2024年智能交通工具:绿色出行安全驾驶
- 劳动通论学习通超星期末考试答案章节答案2024年
- 解码国家安全智慧树知到期末考试答案2024年
- 浙教版六年级劳动项目三-任务二《创意班规巧设计》课件
- 中小企业办公无线网络设计与实现毕业设计论文
- 可研勘察设计费计费标准
- 运动处方知识点
- 某企业员工违规处理登记表(doc 2页)
- 生物地理学热带生物群
- 小学数学科教师家长会优秀PPT完整版
- 脑出血大病历.doc
- 人教版小学语文一年级生字表(打印版)
评论
0/150
提交评论