加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-12 15:25:27 所属栏目:百科 来源:网络整理
导读: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_diskgr

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,other::r--

How to set auto start resources in 11GRAC


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,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,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,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,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
来源:<http://blog.itpub.net/23135684/viewspace-759569/>

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.
-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"

来源:<http://t.askmaclean.com/thread-643-1-1.html>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读