11gR2 RAC Service Not Failing Over To Other Node When Instance Is Shut Down (文档 ID 1324574.1)

11gR2 RAC Service Not Failing Over To Other Node When Instance Is Shut Down (文档 ID 1324574.1)
当实例关闭时,11gR2 RAC服务不会失败到其他节点
应用于:
Oracle Server - Enterprise Edition - Version 10.1.0.2 及以后版本
该文档适用于所有平台


'srvctl stop instance'使实例下来,但没有服务失败到可用实例
In pre-11.2,停止实例通过触发服务故障转移到的/目前可用的实例
1)带有GRB2的GBGRB DB创建一个名字叫 "grb_stest01"的服务比GBR2更可用。
srvctl add service -d GRB -s grb_stest01 -r GRB1 -a GRB2


2)检查服务创建
srvctl config service -d GRB -a
==>
Service name: grb_stest01
Service is enabled
Server pool: GRB_grb_stest01
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: GRB1
Available instances: GRB2
Service name: grb_test01
Service is enabled
Server pool: GRB_grb_test01
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: GRB1
Available instances:


3)开启grb_stest01服务
srvctl start service -d GRB -s grb_stest01


4)确认服务在GRB1上运行
srvctl status service -d GRB
==>
Service grb_stest01 is running on instance(s) GRB1
使用srvctl后面带immediate(默认的)或abort停止实例
srvctl stop instance -d GRB -i GRB1
OR
srvctl stop instance -d GRB -i GRB1 -o abort


srvctl status service -d GRB
==>
Service grb_stest01 is not running


The service does not failover but stops


CHANGES


Upgrade to 11.2


CAUSE
This is expected behaviour in 11.2


If using sqlplus to shutdown instance


In both 10g, 11g, the service  will failover to available instance
 


如果停止实例用srvctl
在pre-11.2,这个服务将会容错可用的实例
在11.2中,服务经不会容错,但会停止
在11.2中,你需要指定-f选项如果你想服务故障转移(在另一个实例启动))可用的实例(即停止实例的三维XXX我XXX1 F)时,使用 srvctl 停止实例。
或者你可以搬迁到另一个服务上,在你通过srvctl停止实例
srvctl relocate service -d exdb -s testsv -i exdb1 -t exdb2


解决方法
使用srvctl带 -f实例故障转移到可用的实例服务。
srvctl stop instance -d GRB -i GRB1 -f
srvctl status service -d GRB
==>
Service grb_stest01 is running on instance(s) GRB2


在12c。语法/行为被改变
1)如果停止实例没有-force或-failover选项,你必须在回采实例运行的服务
错误 (PRCD-1315,PRCR-1014, PRCR-1065, CRS-2529)被报出来。
$srvctl config service -d orcl -s orcl_service01


Service name: orcl_service01
...
....
Preferred instances: orcl1
Available instances: orcl2


$srvctl status service -d orcl
Service orcl_service01 is running on instance(s) orcl1


$ srvctl stop instance -d orcl -i orcl1
PRCD-1315 : failed to stop instances for database orcl
PRCR-1014 : Failed to stop resource ora.orcl.db
PRCR-1065 : Failed to stop resource ora.orcl.db
CRS-2529: Unable to act on 'ora.orcl.db' because that would require stopping or relocating 'ora.orcl.orcl_service01.svc', but the force option was not specified
如果你想停止实例故障转移到另一个服务实例,你需要用-faillover代替-force选项


$ srvctl status service -d orcl
Service orcl_service01 is running on instance(s) orcl1
$ srvctl stop instance -d orcl -i orcl1 -failover
$ srvctl status service -d orcl
Service orcl_service01 is running on instance(s) orcl2


如果你想把实例和正在运行的实例都停止,用-force选项
srvctl status service -d orcl -s orcl_service01
Service orcl_service01 is running on instance(s) orcl1
$ srvctl stop instance -d orcl -i orcl1 -force
$ srvctl status service -d orcl -s orcl_service01
Service orcl_service01 is not running.




参考:
停掉实例时候将会停掉所有运行在该实例上的服务,除非你指定了-f选项,假如你指定了-f,那么当实例被停止的时候,上面的服务将会被故障切换到其他的可用实例


语法和选项:
使用srvctl 停止实例的命令和相关的语法:
srvctl stop instance -d db_unique_name {[-n node_name]|[-i "instance_name_list"]} [-o stop_options] [-f]


-f这个选项将会使正在运行的服务故障切换到其他的实例上









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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值