Tuesday, September 11, 2012

services in 11.2.0.3 with logical standby

Today i was experimenting with services to make them run on a preferred node and with an available node in case of issues.


I created the service as follows


srvctl add service -d   PRDCLU -s myservice -r PRDN2 -a PRDN1 -y AUTOMATIC 

for some reason the service didn't failover to the other service when i performed a shutdown abort.

I experimented a bit with the different options to create a service but the results remained the same.

I googled a bit and came on the site of Freek  and found this interesting article Freek noticed the same behaviour as I.

his article pointed to note 1324574.1 – “11gR2 RAC Service Not Failing Over To Other Node When Instance Is Shut Down”.

This made me think that i hit a bug or something. 

But then I  saw that there was a parameter with srvctl add service to indicate the role of the database the -l option .

I had a look in the 

oraagent_oracle.log


2012-09-11 17:14:14.685: [ora.prd.myservice.xxx.xxx.svc][45] {2:39545:58589} [start] SvcAgent::start: not starting service myservice.xxx.xxx. Role mismatch - Service role: PRIMARY, current DB role: LOGICAL_STANDBY



and my assumptions were confirmed

just creating the service with the -l option solved my problem

srvctl add service -d   PRDCLU -s myservice -r PRDN2 -a PRDN1 -y AUTOMATIC -l logical_standby


The service fails now over correctly.

Thanks Freek for the nice article

No comments: