加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

启动和停止CRS(oracle 11g R2)

(2014-03-25 20:34:54)
标签:

it

oracle

杭州美创科技有限公司

分类: 工作记录

Oracle CRS 在系统启动的时候会自动的启动。通常不需要手动启动和停止CRS,以下的情况例外:

·向Oracle Grid Infrastructure 应用补丁集

·OS/系统维护

·调试CRS问题

 

要启动CRS

[root@node1 bin]# ./crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

 

[root@node2 bin]# ./crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

 

 

要停止CRS

[root@node1 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node1'

CRS-2673: Attempting to stop 'ora.crsd' on 'node1'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node1'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'node1'

CRS-2673: Attempting to stop 'ora.cvu' on 'node1'

CRS-2673: Attempting to stop 'ora.OCRVOTE.dg' on 'node1'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node1'

CRS-2673: Attempting to stop 'ora.node.db' on 'node1'

CRS-2677: Stop of 'ora.cvu' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.cvu' on 'node2'

CRS-2676: Start of 'ora.cvu' on 'node2' succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.node1.vip' on 'node1'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.scan1.vip' on 'node1'

CRS-2677: Stop of 'ora.node1.vip' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.node1.vip' on 'node2'

CRS-2677: Stop of 'ora.scan1.vip' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.scan1.vip' on 'node2'

CRS-2676: Start of 'ora.node1.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.node.db' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node1'

CRS-2676: Start of 'ora.scan1.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.registry.acfs' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'node2'

CRS-2677: Stop of 'ora.DATA.dg' on 'node1' succeeded

CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'node2' succeeded

CRS-2677: Stop of 'ora.OCRVOTE.dg' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node1'

CRS-2677: Stop of 'ora.asm' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.ons' on 'node1'

CRS-2677: Stop of 'ora.ons' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node1'

CRS-2677: Stop of 'ora.net1.network' on 'node1' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node1' has completed

CRS-2677: Stop of 'ora.crsd' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.mdnsd' on 'node1'

CRS-2673: Attempting to stop 'ora.crf' on 'node1'

CRS-2673: Attempting to stop 'ora.ctssd' on 'node1'

CRS-2673: Attempting to stop 'ora.evmd' on 'node1'

CRS-2673: Attempting to stop 'ora.asm' on 'node1'

CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'node1'

CRS-2677: Stop of 'ora.crf' on 'node1' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node1' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node1' succeeded

CRS-2677: Stop of 'ora.mdnsd' on 'node1' succeeded

CRS-2677: Stop of 'ora.asm' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'node1'

CRS-2677: Stop of 'ora.drivers.acfs' on 'node1' succeeded

CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node1'

CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on 'node1'

CRS-2677: Stop of 'ora.gipcd' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on 'node1'

CRS-2677: Stop of 'ora.gpnpd' on 'node1' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node1' has completed

CRS-4133: Oracle High Availability Services has been stopped.

 

 

 

[root@node2 ~]# cd /u01/11.2.0/grid/bin/

[root@node2 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node2'

CRS-2673: Attempting to stop 'ora.crsd' on 'node2'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node2'

CRS-2673: Attempting to stop 'ora.node2.vip' on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2'

CRS-2673: Attempting to stop 'ora.cvu' on 'node2'

CRS-2673: Attempting to stop 'ora.OCRVOTE.dg' on 'node2'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node2'

CRS-2673: Attempting to stop 'ora.node.db' on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'node2'

CRS-2673: Attempting to stop 'ora.oc4j' on 'node2'

CRS-2677: Stop of 'ora.cvu' on 'node2' succeeded

CRS-2677: Stop of 'ora.node2.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.node1.vip' on 'node2'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.scan1.vip' on 'node2'

CRS-2677: Stop of 'ora.node.db' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node2'

CRS-2677: Stop of 'ora.node1.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.registry.acfs' on 'node2' succeeded

CRS-2677: Stop of 'ora.scan1.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.DATA.dg' on 'node2' succeeded

CRS-2677: Stop of 'ora.OCRVOTE.dg' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2677: Stop of 'ora.oc4j' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.ons' on 'node2'

CRS-2677: Stop of 'ora.ons' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node2'

CRS-2677: Stop of 'ora.net1.network' on 'node2' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node2' has completed

CRS-2677: Stop of 'ora.crsd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.mdnsd' on 'node2'

CRS-2673: Attempting to stop 'ora.crf' on 'node2'

CRS-2673: Attempting to stop 'ora.ctssd' on 'node2'

CRS-2673: Attempting to stop 'ora.evmd' on 'node2'

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'node2'

CRS-2677: Stop of 'ora.crf' on 'node2' succeeded

CRS-2677: Stop of 'ora.mdnsd' on 'node2' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node2' succeeded

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'node2'

CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'node2' succeeded

CRS-2677: Stop of 'ora.drivers.acfs' on 'node2' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node2'

CRS-2677: Stop of 'ora.cssd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on 'node2'

CRS-2677: Stop of 'ora.gipcd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on 'node2'

CRS-2677: Stop of 'ora.gpnpd' on 'node2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

 

要停止在所有节点上运行的全部集群资源

[root@node1 bin]# ./crsctl stop cluster -all

CRS-2673: Attempting to stop 'ora.crsd' on 'node1'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node1'

CRS-2673: Attempting to stop 'ora.cvu' on 'node1'

CRS-2673: Attempting to stop 'ora.oc4j' on 'node1'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'node1'

CRS-2673: Attempting to stop 'ora.OCRVOTE.dg' on 'node1'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node1'

CRS-2673: Attempting to stop 'ora.node.db' on 'node1'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1'

CRS-2673: Attempting to stop 'ora.crsd' on 'node2'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node2'

CRS-2673: Attempting to stop 'ora.OCRVOTE.dg' on 'node2'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node2'

CRS-2673: Attempting to stop 'ora.node.db' on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.node2.vip' on 'node2'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.scan1.vip' on 'node1'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.node1.vip' on 'node1'

CRS-2677: Stop of 'ora.node.db' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node2'

CRS-2677: Stop of 'ora.registry.acfs' on 'node2' succeeded

CRS-2677: Stop of 'ora.node2.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.node1.vip' on 'node1' succeeded

CRS-2677: Stop of 'ora.DATA.dg' on 'node2' succeeded

CRS-2677: Stop of 'ora.scan1.vip' on 'node1' succeeded

CRS-2677: Stop of 'ora.cvu' on 'node1' succeeded

CRS-2677: Stop of 'ora.OCRVOTE.dg' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.ons' on 'node2'

CRS-2677: Stop of 'ora.node.db' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node1'

CRS-2677: Stop of 'ora.ons' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node2'

CRS-2677: Stop of 'ora.net1.network' on 'node2' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node2' has completed

CRS-2677: Stop of 'ora.crsd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.ctssd' on 'node2'

CRS-2673: Attempting to stop 'ora.evmd' on 'node2'

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2677: Stop of 'ora.DATA.dg' on 'node1' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node2' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node2' succeeded

CRS-2677: Stop of 'ora.registry.acfs' on 'node1' succeeded

CRS-2677: Stop of 'ora.OCRVOTE.dg' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node1'

CRS-2677: Stop of 'ora.asm' on 'node1' succeeded

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'node2'

CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node2'

CRS-2677: Stop of 'ora.cssd' on 'node2' succeeded

CRS-2677: Stop of 'ora.oc4j' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.ons' on 'node1'

CRS-2677: Stop of 'ora.ons' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node1'

CRS-2677: Stop of 'ora.net1.network' on 'node1' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node1' has completed

CRS-2677: Stop of 'ora.crsd' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.ctssd' on 'node1'

CRS-2673: Attempting to stop 'ora.evmd' on 'node1'

CRS-2673: Attempting to stop 'ora.asm' on 'node1'

CRS-2677: Stop of 'ora.evmd' on 'node1' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node1' succeeded

CRS-2677: Stop of 'ora.asm' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'node1'

CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node1'

CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded

 

要启动左右节点上的所有集群资源:

[root@node1 bin]# ./crsctl start cluster -all

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'node2'

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'node1'

CRS-2676: Start of 'ora.cssdmonitor' on 'node1' succeeded

CRS-2676: Start of 'ora.cssdmonitor' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'node2'

CRS-2672: Attempting to start 'ora.diskmon' on 'node2'

CRS-2672: Attempting to start 'ora.cssd' on 'node1'

CRS-2676: Start of 'ora.diskmon' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.diskmon' on 'node1'

CRS-2676: Start of 'ora.diskmon' on 'node1' succeeded

CRS-2676: Start of 'ora.cssd' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.ctssd' on 'node2'

CRS-2676: Start of 'ora.cssd' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.ctssd' on 'node1'

CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'node1'

CRS-2676: Start of 'ora.ctssd' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.evmd' on 'node2'

CRS-2676: Start of 'ora.ctssd' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'node2'

CRS-2672: Attempting to start 'ora.evmd' on 'node1'

CRS-2676: Start of 'ora.evmd' on 'node2' succeeded

CRS-2676: Start of 'ora.evmd' on 'node1' succeeded

CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.asm' on 'node1'

CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.asm' on 'node2'

CRS-2676: Start of 'ora.asm' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.crsd' on 'node1'

CRS-2676: Start of 'ora.asm' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.crsd' on 'node2'

CRS-2676: Start of 'ora.crsd' on 'node1' succeeded

CRS-2676: Start of 'ora.crsd' on 'node2' succeeded

 

验证CRS

以下命令可以用于验证集群及相关CRS守护进程的状态。

要检查一个集群的当前状态

[root@node1 bin]# ./crsctl check cluster

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

 

检查CRS的状态:

[root@node1 bin]# ./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

 

要检查OHASD守护进程的当前状态

[root@node1 bin]# ./crsctl check has

CRS-4638: Oracle High Availability Services is online

[root@node1 bin]#

 

禁用和启用CRS

[root@node1 bin]# ./crsctl disable crs

CRS-4621: Oracle High Availability Services autostart is disabled.

 

[root@node1 bin]# ./crsctl enable crs

CRS-4622: Oracle High Availability Services autostart is enabled.

 

 

 

要显示集群资源的状态

[root@node1 bin]# ./crsctl stat res -t

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

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

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

Local Resources

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

ora.DATA.dg

               ONLINE  ONLINE       node1                                       

               ONLINE  ONLINE       node2                                       

ora.LISTENER.lsnr

               ONLINE  ONLINE       node1                                       

               ONLINE  ONLINE       node2                                       

ora.OCRVOTE.dg

               ONLINE  ONLINE       node1                                       

               ONLINE  ONLINE       node2                                       

ora.asm

               ONLINE  ONLINE       node1                    Started            

               ONLINE  ONLINE       node2                    Started            

ora.gsd

               OFFLINE OFFLINE      node1                                       

               OFFLINE OFFLINE      node2                                       

ora.net1.network

               ONLINE  ONLINE       node1                                       

               ONLINE  ONLINE       node2                                       

ora.ons

               ONLINE  ONLINE       node1                                       

               ONLINE  ONLINE       node2                                       

ora.registry.acfs

               ONLINE  ONLINE       node1                                       

               ONLINE  ONLINE       node2                                       

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

            ONLINE  ONLINE       node2                                       

ora.cvu

            ONLINE  ONLINE       node2                                       

ora.node.db

            ONLINE  ONLINE       node1                    Open               

            ONLINE  ONLINE       node2                    Open               

ora.node1.vip

            ONLINE  ONLINE       node1                                       

ora.node2.vip

            ONLINE  ONLINE       node2                                       

ora.oc4j

            ONLINE  ONLINE       node2                                       

ora.scan1.vip

            ONLINE  ONLINE       node2

 

查看一个集群的脚本:

[root@node1 bin]# ./crsctl query crs softwareversion

Oracle Clusterware version on node [node1] is [11.2.0.4.0]

 

管理OCR

OCRoracle RAC配置信息仓库.linux中位于/etc/oracle,Solaris系统中位于/var/opt/oracle

 

[root@node1 oracle]# cat ocr.loc

ocrconfig_loc=+OCRVOTE

local_only=FALSE

 

1、检查OCR的完整性

[root@node1 bin]# ./ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                          3

         Total space (kbytes)        262120

         Used space (kbytes)           3088

         Available space (kbytes) :     259032

         ID                       151188908

         Device/File Name          +OCRVOTE

                                    Device/File integrity check succeeded

 

                                    Device/File not configured

 

                                    Device/File not configured

 

                                    Device/File not configured

 

                                    Device/File not configured

 

         Cluster registry integrity check succeeded

 

         Logical corruption check succeeded

 

这条命令还在$GRID_HOME/log//client目录中创建一个日志文件;这个日志文件的内容反映了在输出中显示的内容

[root@node1 client]# more ocrcheck_10785.log

Oracle Database 11g Clusterware Release 11.2.0.4.0 - Production Copyright 1996, 2011 Oracle. All rights reserved.

2014-03-24 22:05:51.624: [OCRCHECK][2052440880]ocrcheck starts...

  CLWAL][2052440880]clsw_Initialize: OLR initlevel [30000]

2014-03-24 22:06:14.950: [OCRCHECK][2052440880]protchcheck: OCR status : total = [262120], used = [3088], avail = [259032]

 

2014-03-24 22:06:15.127: [OCRCHECK][2052440880]Exiting [status=success]...

[root@node1 client]#

 

 

2、转储OCR信息

下面说明如何将OCR文件内容转储到一个XML文件中:

[root@node1 bin]# ./ocrdump 1.xml -xml

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有