Oracle 11g部分 RAC資源不隨機自啟動解決辦法

woshishui11211發表於2015-03-16

Oracle 11g RAC

部分資源不隨機自啟動解決辦法

 

 

一、      現象描述

開啟2節點RAC伺服器時,某些資源不隨系統開機自啟動

 

# crs_stat -t

Name           Type           Target    State     Host       

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

ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac2       

ora.FRA.dg     ora....up.type ONLINE    ONLINE    rac2       

ora....ER.lsnr ora....er.type OFFLINE   OFFLINE              

ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac2       

ora....VOTE.dg ora....up.type ONLINE    ONLINE    rac1       

ora.asm        ora.asm.type   ONLINE    ONLINE    rac1       

ora.cvu        ora.cvu.type   ONLINE    ONLINE    rac2       

ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              

ora....network ora....rk.type ONLINE    ONLINE    rac1       

ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    rac2       

ora.ons        ora.ons.type   ONLINE    ONLINE    rac1       

ora.prod.db    ora....se.type OFFLINE   OFFLINE              

ora....SM1.asm application    ONLINE    ONLINE    rac1       

ora....C1.lsnr application    OFFLINE   OFFLINE              

ora.rac1.gsd   application    OFFLINE   OFFLINE              

ora.rac1.ons   application    ONLINE    ONLINE    rac1       

ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac2       

ora....SM2.asm application    ONLINE    ONLINE    rac2       

ora....C2.lsnr application    OFFLINE   OFFLINE              

ora.rac2.gsd   application    OFFLINE   OFFLINE              

ora.rac2.ons   application    ONLINE    ONLINE    rac2       

ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2       

ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac2       

ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac2

 

二、      解決辦法

2.1 檢視資源名

# crs_stat -v

NAME=ora.DATA.dg

TYPE=ora.diskgroup.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.FRA.dg

TYPE=ora.diskgroup.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.LISTENER.lsnr

TYPE=ora.listener.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.LISTENER_SCAN1.lsnr

TYPE=ora.scan_listener.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.OCR_VOTE.dg

TYPE=ora.diskgroup.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.asm

TYPE=ora.asm.type

GEN_USR_ORA_INST_NAME@SERVERNAME(rac1)=+ASM1

GEN_USR_ORA_INST_NAME@SERVERNAME(rac2)=+ASM2

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.cvu

TYPE=ora.cvu.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.gsd

TYPE=ora.gsd.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=OFFLINE

STATE=OFFLINE

 

NAME=ora.net1.network

TYPE=ora.network.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.oc4j

TYPE=ora.oc4j.type

RESTART_ATTEMPTS=1

RESTART_COUNT=0

FAILURE_THRESHOLD=2

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.ons

TYPE=ora.ons.type

RESTART_ATTEMPTS=3

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.prod.db

TYPE=ora.database.type

GEN_START_OPTIONS@SERVERNAME(rac1)=open

GEN_START_OPTIONS@SERVERNAME(rac2)=open

GEN_USR_ORA_INST_NAME@SERVERNAME(rac1)=prod1

GEN_USR_ORA_INST_NAME@SERVERNAME(rac2)=prod2

RESTART_ATTEMPTS=2

RESTART_COUNT=0

USR_ORA_INST_NAME@SERVERNAME(rac1)=prod1

USR_ORA_INST_NAME@SERVERNAME(rac2)=prod2

FAILURE_THRESHOLD=1

FAILURE_COUNT=0

TARGET=OFFLINE

STATE=OFFLINE

 

NAME=ora.rac1.ASM1.asm

TYPE=application

GEN_USR_ORA_INST_NAME@SERVERNAME(rac1)=+ASM1

GEN_USR_ORA_INST_NAME@SERVERNAME(rac2)=+ASM2

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.rac1.LISTENER_RAC1.lsnr

TYPE=application

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=OFFLINE

STATE=OFFLINE on rac1

 

NAME=ora.rac1.gsd

TYPE=application

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=OFFLINE

STATE=OFFLINE

 

NAME=ora.rac1.ons

TYPE=application

RESTART_ATTEMPTS=3

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.rac1.vip

TYPE=ora.cluster_vip_net1.type

RESTART_ATTEMPTS=0

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.rac2.vip

TYPE=ora.cluster_vip_net1.type

RESTART_ATTEMPTS=0

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.registry.acfs

TYPE=ora.registry.acfs.type

RESTART_ATTEMPTS=5

RESTART_COUNT=0

FAILURE_THRESHOLD=

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

NAME=ora.scan1.vip

TYPE=ora.scan_vip.type

RESTART_ATTEMPTS=0

RESTART_COUNT=0

FAILURE_THRESHOLD=0

FAILURE_COUNT=0

TARGET=ONLINE

STATE=ONLINE on rac1

 

2.2 修改資源屬性

u  # crsctl modify resource ora.rac1.LISTENER_RAC1.lsnr -attr "AUTO_START=always"

CRS-2720: 'ora.rac1.LISTENER_RAC1.lsnr' is a resource alias for 'ora.LISTENER.lsnr' and cannot be updated

CRS-4000: Command Modify failed, or completed with errors.

//修改不成功,按照提示修改ora.LISTENER.lsnr

 

u  # crsctl modify resource "ora.LISTENER.lsnr" -attr "AUTO_START=always"

 

u  重啟crs

#crsctl stop crs

#crsctl start crs

 

u  檢查crs

# crs_stat -t

Name           Type           Target    State     Host       

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

ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1       

ora.FRA.dg     ora....up.type ONLINE    ONLINE    rac1       

ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1       

ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1       

ora....VOTE.dg ora....up.type ONLINE    ONLINE    rac1       

ora.asm        ora.asm.type   ONLINE    ONLINE    rac1       

ora.cvu        ora.cvu.type   ONLINE    ONLINE    rac1       

ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              

ora....network ora....rk.type ONLINE    ONLINE    rac1       

ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    rac1       

ora.ons        ora.ons.type   ONLINE    ONLINE    rac1       

ora.prod.db    ora....se.type OFFLINE   OFFLINE              

ora....SM1.asm application    ONLINE    ONLINE    rac1       

ora....C1.lsnr application    ONLINE    ONLINE    rac1       

ora.rac1.gsd   application    OFFLINE   OFFLINE              

ora.rac1.ons   application    ONLINE    ONLINE    rac1       

ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1       

ora....SM2.asm application    ONLINE    ONLINE    rac2       

ora....C2.lsnr application    ONLINE    ONLINE    rac2       

ora.rac2.gsd   application    OFFLINE   OFFLINE              

ora.rac2.ons   application    ONLINE    ONLINE    rac2       

ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2       

ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1       

ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1     

監聽資源正常

 

u  同樣方法修改db資源

#crsctl modify resource "ora.prod.db" -attr "AUTO_START=always"

#crsctl stop crs

#crsctl start crs

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26217983/viewspace-1461408/,如需轉載,請註明出處,否則將追究法律責任。

相關文章