ORACLE 数据库 ha 无法自动切换 asm 磁盘组没有自动mount

oracle 11.2.0.3 asm HA 无法切换


检查主备个磁盘组  ora.DG_ORA.dg 属性,
crs_stat -p ora.DG_ORA.dg 属性 
AUTO_START=never
用一下命令修改
crsctl modify resource "ora.DG_ORA.dg" -attr "AUTO_START=always"
另外一种情况 是spfile 里的参数 asm_diskgroup 主备两边不一致,修改成一致


oracle 11g rac 无法自动启动

如果以上的操作依然不能使数据库资源自动启动,那么参考下面这篇文章修改资源AUTO_START属性。
查看资源状态:
crsctl status resource   资源        -p
    crsctl <command> <object> -h  For example, crsctl relocate resource -h
[grid@edudb1 ~]$ crsctl status resource ora.DATADG.dg                   -p
NAME=ora.DATADG.dg
TYPE=ora.diskgroup.type
ACL=owner:grid:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ALIAS_NAME=
AUTO_START=always
CHECK_INTERVAL=300
CHECK_TIMEOUT=30
DEFAULT_TEMPLATE=
DEGREE=1
DESCRIPTION=CRS resource type definition for ASM disk group resource
ENABLED=1
LOAD=1
LOGGING_LEVEL=1
NLS_LANG=
NOT_RESTARTING_TEMPLATE=
OFFLINE_CHECK_INTERVAL=0
PROFILE_CHANGE_TEMPLATE=
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=60
START_DEPENDENCIES=hard(ora.asm) pullup(ora.asm)
START_TIMEOUT=900
STATE_CHANGE_TEMPLATE=
STOP_DEPENDENCIES=hard(intermediate:ora.asm)
STOP_TIMEOUT=180
TYPE_VERSION=1.2
UPTIME_THRESHOLD=1d
USR_ORA_ENV=
USR_ORA_OPI=false
USR_ORA_STOP_MODE=
VERSION=11.2.0.4.0

查看属主:
[grid@edudb1 ~]$ crsctl status resource  ora.DATADG.dg  -p | grep ACL=
ACL=owner: grid:rwx,pgrp:oinstall:rwx,other::r--

How to set auto start resources in 11G RAC


Changing Resource Attributes in 11gR2 Grid Infrastructure

In 11gR2 grid infrastructure installations certain resources may have auto start set to never and restore. This was observed both on environments where clusterware was upgraded to 11.2 as well as newly installed environments. Depending on the situation these may not be desirable. Auto start attribute setting could be changed as follows.

AUTO_START=restore

Restore indicates whether Oracle Clusterware should automatically start a resource after a cluster restart. Valid AUTO_START values are:


-always—Causes the resource to restart when the node restarts regardless of the resource's state when the node stopped.


-restore—Does not start the resource at restart time if it was in an offline state, such as STATE=OFFLINE, TARGET=OFFLINE, when the node stopped. The resource is restored to its state when the node went down. The resource is started only if it was online before and not otherwise.


-never—Oracle Clusterware never restarts the resource regardless of the resource's state when the node stopped.


Action Plan:

将ora.FRA.dg 等资源的 AUTO_START属性修改为 Always 

如:
crsctl modify resource "ora.FRA.dg" -attr "AUTO_START=always"
crsctl modify resource "ora.FRA01.dg" -attr "AUTO_START=always"


1. Check the current auto start values

# crsctl stat res -p
NAME=ora.FLASH.dg
TYPE=ora.diskgroup.type
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ALIAS_NAME=
AUTO_START=never      

NAME=ora.DATA.dg
TYPE=ora.diskgroup.type
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ALIAS_NAME=
AUTO_START=never     

NAME=ora.clusdb.db
TYPE=ora.database.type
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
ACTIVE_PLACEMENT=1
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
AUTO_START=restore

2. Since ASM diskgroup that database depend on will never auto start database will also be unavailable.

3. Change the resource start attribute with

# crsctl modify resource "ora.FLASH.dg" -attr "AUTO_START=always"
# crsctl modify resource "ora.DATA.dg" -attr "AUTO_START=always"
# crsctl modify resource ora.clusdb.db -attr "AUTO_START=always"

Auto start must be upper case if not command will fail

crsctl modify resource ora.clusdb.db -attr "auto_start=always"
CRS-0160: The attribute 'auto_start' is not supported in this resource type.
CRS-4000: Command Modify failed, or completed with errors.

4. Verify the status change with

# crsctl stat res -p
NAME=ora.clusdb.db
TYPE=ora.database.type
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
ACTIVE_PLACEMENT=1
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
AUTO_START=always
以上文章转载自: http://oracleracdba1.wordpress.com/2013/01/29/how-to-set-auto-start-resources-in-11g-rac/

Oracle  10gR2 RAC 参考以下的内容修改资源AUTO_START属性。

使用命令 crs_register resource_name -update [option ...] [-o option,...] -q
如:修改资源ora.dbrac.dbrac2.inst 中 AUTO_START值 0,表示:启动到资源重启之前的状态
1,表示: 启动资源
2,表示:不启动资源
修改属性名称采用第一个字母表示,如 AUTO_START = as
#crs_register resource_name -update -o as=2

./crs_register ora.rkywk.db -update -o as=1
./crs_register ora.rkcxk.db -update -o as=1

crs_register ora.rkywk.db -update -o as=always
crs_register ora.rkcxk.db -update -o as=always


AUTO_START=restore

Restore indicates whether Oracle Clusterware should automatically start a resource after a cluster restart. Valid AUTO_START values are:


-always—Causes the resource to restart when the node restarts regardless of the resource's state when the node stopped.


-restore—Does not start the resource at restart time if it was in an offline state, such as STATE=OFFLINE, TARGET=OFFLINE, when the node stopped. The resource is restored to its state when the node went down. The resource is started only if it was online before and not otherwise.


-never—Oracle Clusterware never restarts the resource regardless of the resource's state when the node stopped.


Action Plan:

将ora.FRA.dg 等资源的 AUTO_START属性修改为 Always 

如:
crsctl modify resource "ora.FRA.dg" -attr "AUTO_START=always"
crsctl modify resource "ora.FRA01.dg" -attr "AUTO_START=always"


   
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值