日期:2014-05-16 浏览次数:20606 次
之前整理了2篇Oracle 10gRAC的启动与关闭相关的文章,参考:
Oracle 10gRAC 启动与关闭
http://blog.csdn.net/tianlesoftware/article/details/5349003
Oracle RAC 常用维护工具和命令
http://blog.csdn.net/tianlesoftware/article/details/5358573
在Oracle 11gR2 下的RAC,架构发生了变化。CRS的信息也是放在ASM 实例里的,所以要关asm,必须关闭crs, 如果还使用了acfs的话,一关crs那么acfs里的信息也不能访问了,所以一般不重启机器,不轻易关crs, 其他的service可以根据自己的需要去stop/start。
注意:
11g RAC 开启资源相对比较慢(即使命令后面显示的资源都start succeeded,通过crs_stat -t查看都不一定online), 需要耐心并查看log。
在Oracle 11gR2 里引入了Oracle Restart的特性,其用来管理Cluster Resource。关于Oracle Restart,参考我的Blog:
Oracle 11g 新特性 -- Oracle Restart 说明
http://blog.csdn.net/tianlesoftware/article/details/8435670
用root用户,在Oracle11gR2中停止和启动集群的命令如下:
#crsctl stop has [-f]
#crsctl start has
注意:
对于crsctl stop has 只有一个可选的参数就是-f,该命令只能停执行该命令服务器上的HAS.而不能停所有节点上的。所以要把RAC 全部停掉,需要在所有节点执行该命令。
下面的2个命令:使用crs 和 使用has 效果是完全一样的:
#crsctl stop crs [-f]
#crsctl start crs
示例:
--停止HAS
[root@rac1 bin]# ./crsctl stophas
CRS-2791:Starting shutdown of Oracle High Availability Services-managed resources on'rac1'
CRS-2673:Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790:Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673:Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2673:Attempting to stop 'ora.OCRVOTING.dg' on 'rac1'
CRS-2673:Attempting to stop 'ora.sdd.db' on 'rac1'
CRS-2673:Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
CRS-2673:Attempting to stop 'ora.oc4j' on 'rac1'
CRS-2673:Attempting to stop 'ora.cvu' on 'rac1'
CRS-2677: Stopof 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.scan1.vip' on 'rac1'
CRS-2677: Stopof 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.rac1.vip' on 'rac1'
CRS-2677: Stopof 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.rac1.vip' on 'rac2'
CRS-2677: Stopof 'ora.scan1.vip' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.scan1.vip' on 'rac2'
CRS-2676:Start of 'ora.scan1.vip' on 'rac2' succeeded
CRS-2676:Start of 'ora.rac1.vip' on 'rac2' succeeded
CRS-2672:Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac2'
CRS-2677: Stopof 'ora.sdd.db' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2673:Attempting to stop 'ora.FRA.dg' on 'rac1'
CRS-2676:Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac2' succeeded
CRS-2677: Stopof 'ora.FRA.dg' on 'rac1' succeeded
CRS-2677: Stopof 'ora.DATA.dg' on 'rac1' succeeded
CRS-2677: Stopof 'ora.oc4j' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.oc4j' on 'rac2'
CRS-2677: Stopof 'ora.cvu' on 'rac1' succeeded
CRS-2672:Attempting to start 'ora.cvu' on 'rac2'
CRS-2676:Start of 'ora.cvu' on 'rac2' succeeded
CRS-2677: Stopof 'ora.OCRVOTING.dg' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stopof 'ora.asm' on 'rac1' succeeded
CRS-2676:Start of 'ora.oc4j' on 'rac2' succeeded
CRS-2673:Attempting to stop 'ora.ons' on 'rac1'
CRS-2677: Stopof 'ora.ons' on 'rac1' succeeded
CRS-2673:Attempting to stop 'ora.net1.network' on 'rac1'
<