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

Oracle11g/12c开启&关闭RAC DB(转载+测试)

(2017-05-05 13:03:10)
分类: Oracle DBA

第八章 如何开启&关闭12c R2 RAC DB

关闭顺序:

 

1、关闭数据库,oracle用户执行srvctl命令:

 

 [oracle@paycore01 ~]$ srvctl stop database -d paidit ---停止所有节点上的实例

 

或者每个节点登录数据库后执行SQL>shutdown immediate

 

2,停止HAS(High Availability Services),必须以root用户

 

[root@paycore01 oracle]# cd /oracle/app/11.2.0/grid/bin

 

[root@paycore01 bin]# ./crsctl stop has -f

 

 

 

3,停止集群服务,必须以root用户:

 

[root@paycore01 oracle]# cd /oracle/app/11.2.0/grid/bin

 

 [root@paycore01 bin]# ./crsctl stop cluster -all  ----停止所有节点服务

 

[root@paycore01 bin]# ./crsctl stop cluster        ----停止本节点集群服务,每个节点分别执行 

 

[root@paycore01 bin]# pwd

/oracle/app/11.2.0/grid/bin

[root@paycore01 bin]# ./crsctl stop cluster

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

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

CRS-2673: Attempting to stop 'ora.DATA01.dg' on 'paycore01'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'paycore01'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'paycore01'

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

CRS-2673: Attempting to stop 'ora.chad' on 'paycore01'

CRS-2673: Attempting to stop 'ora.chad' on 'paycore02'

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

CRS-2673: Attempting to stop 'ora.qosmserver' on 'paycore01'

CRS-2677: Stop of 'ora.DATA01.dg' on 'paycore01' succeeded

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

CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'paycore01' succeeded

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

CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'paycore01' succeeded

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

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

CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'paycore01'

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

CRS-2677: Stop of 'ora.MGMT.dg' on 'paycore01' succeeded

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

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

CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'paycore01'

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

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

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

CRS-2677: Stop of 'ora.qosmserver' on 'paycore01' succeeded

CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'paycore01' succeeded

CRS-2677: Stop of 'ora.chad' on 'paycore01' succeeded

CRS-2677: Stop of 'ora.chad' on 'paycore02' succeeded

CRS-2673: Attempting to stop 'ora.mgmtdb' on 'paycore01'

CRS-2677: Stop of 'ora.mgmtdb' on 'paycore01' succeeded

CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'paycore01'

CRS-2677: Stop of 'ora.MGMTLSNR' on 'paycore01' succeeded

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

CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'paycore02'

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

CRS-2676: Start of 'ora.MGMTLSNR' on 'paycore02' succeeded

CRS-2672: Attempting to start 'ora.mgmtdb' on 'paycore02'

CRS-2676: Start of 'ora.mgmtdb' on 'paycore02' succeeded

CRS-2672: Attempting to start 'ora.chad' on 'paycore02'

CRS-2676: Start of 'ora.chad' on 'paycore02' succeeded

CRS-2672: Attempting to start 'ora.qosmserver' on 'paycore02'

CRS-2672: Attempting to start 'ora.scan2.vip' on 'paycore02'

CRS-2672: Attempting to start 'ora.scan3.vip' on 'paycore02'

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

CRS-2672: Attempting to start 'ora.paycore01.vip' on 'paycore02'

CRS-2676: Start of 'ora.scan3.vip' on 'paycore02' succeeded

CRS-2676: Start of 'ora.scan2.vip' on 'paycore02' succeeded

CRS-2676: Start of 'ora.paycore01.vip' on 'paycore02' succeeded

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

CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'paycore02'

CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'paycore02'

CRS-2676: Start of 'ora.qosmserver' on 'paycore02' succeeded

CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'paycore02' succeeded

CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'paycore02' succeeded

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

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

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

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

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

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

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

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

CRS-2673: Attempting to stop 'ora.storage' on 'paycore01'

CRS-2677: Stop of 'ora.storage' on 'paycore01' succeeded

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

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

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

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

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

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

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

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

[root@paycore01 bin]#

 

 

[root@paycore02 ~]# cd /oracle/app/11.2.0/grid/bin

[root@paycore02 bin]# ./crsctl stop cluster

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

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

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'paycore02'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'paycore02'

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

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

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

CRS-2673: Attempting to stop 'ora.DATA01.dg' on 'paycore02'

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

CRS-2673: Attempting to stop 'ora.chad' on 'paycore02'

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

CRS-2673: Attempting to stop 'ora.qosmserver' on 'paycore02'

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

CRS-2677: Stop of 'ora.DATA01.dg' on 'paycore02' succeeded

CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'paycore02' succeeded

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

CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'paycore02' succeeded

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

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

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

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

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

CRS-2677: Stop of 'ora.chad' on 'paycore02' succeeded

CRS-2673: Attempting to stop 'ora.mgmtdb' on 'paycore02'

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

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

CRS-2677: Stop of 'ora.mgmtdb' on 'paycore02' succeeded

CRS-2673: Attempting to stop 'ora.MGMT.dg' on 'paycore02'

CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'paycore02'

CRS-2677: Stop of 'ora.qosmserver' on 'paycore02' succeeded

CRS-2677: Stop of 'ora.MGMT.dg' on 'paycore02' succeeded

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

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

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

CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'paycore02'

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

CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'paycore02' succeeded

CRS-2677: Stop of 'ora.MGMTLSNR' on 'paycore02' succeeded

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

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

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

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

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

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

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

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

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

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

CRS-2673: Attempting to stop 'ora.storage' on 'paycore02'

CRS-2677: Stop of 'ora.storage' on 'paycore02' succeeded

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

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

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

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

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

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

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

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

[root@paycore02 bin]#

 

 

也可以如下控制所停节点:

 

[root@paycore01 bin]#  ./crsctl stop cluster -n rac1 rac2

 

如果在一个节点停止其他所有节点的,而不一一执行命令,则也可以采用:

 

[root@paycore01 bin]# ./crsctl stop cluster –all

 

 

 

启动顺序:

 

12c R2RAC默认开机会自启动,当然如果需要手工启动。手工启动按照cluster, HAS, database的顺序启动即可,具体命令如下:

 

1、启动集群(cluster

 

[root@ paycore01 ~]# ./crsctl start cluster -all  --所有节点同时启动

 

或者只启动指定节点的

 

[root@ paycore01 ~]# ./crsctl start cluster -n rac1 rac2  --两个节点同时启动

 

 

[root@paycore01 bin]# ./crsctl start cluster

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CRS-2672: Attempting to start 'ora.storage' on 'paycore01'

CRS-2676: Start of 'ora.storage' on 'paycore01' succeeded

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

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

 

 

 

[root@paycore02 bin]# ./crsctl start cluster

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CRS-2672: Attempting to start 'ora.storage' on 'paycore02'

CRS-2676: Start of 'ora.storage' on 'paycore02' succeeded

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

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

[root@paycore02 bin]#

 

 

2、启动HAS(High Availability Services),必须以root用户

 

[root@ paycore01 bin]# ./crsctl start has 

 

以上has启动命令需要在每个节点分别执行

 

 

 

3、启动数据库,oracle用户执行srvctl命令(假设数据库名为paidit):

 

 [oracle@ paycore01 ~]$ srvctl start database -d paidit ---停止所有节点上的实例

 

或者每个节点登录数据库后执行SQL>startup 

 

 

 

 

通过初步测试,似乎开启&关闭HASDB即可,或者直接./crsctl start/stop cluster

0

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

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

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

新浪公司 版权所有