oracle - How to make dataguard switchover seamlessly -


in dataguard configuration on 12c environment, when perform switchover primary (foo) standby (bar) , try sqlplus in user@foo, receive "ora-011033: oracle initialization or shutdown in progress" error instead of being able connect new primary(bar).

now, know because connection still pointing foo address instead of bar address, , according many articles, need create new "virtual" service handle different connections, trigger stop/start service after rolechange.

i did , service_names parameter set new "virtual" service, switchover work , can switch when trying sqlplus user@foo throws ora-011033. trigger useless , service continues run on both foo , bar because seems having parameter set overrides whatever trigger tries do.

now if don't define parameter, switchover works fine, , triggers job, , when sqlplus user@foo, correctly redirect me bar address. however, when try switchover foo, receive following in dg alert log:

redo transport problem detected: redo transport database foo has following error:
ora-16047: dgid mismatch between destination setting , target database 08/05/2016 16:01:02 initialization of connection failed. expected destination db_unique_name foo. database reached bar failed send message site foo. error code ora-16642. data guard broker status summary:
type name severity status configuration foo_dg warning ora-16607 primary database bar error ora-16778 physical standby database foo error ora-16642

on foo:

log_archive_dest_2='service="bar"','async noaffirm delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="bar" net_timeout=30','valid_for=(online_logfile,all_roles)' fal_client='foo' fal_server='bar'

on bar:

log_archive_dest_2='service="foo", async noaffirm delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="foo" valid_for=(online_logfile,all_roles)' fal_client='bar' fal_server='foo'

entries in ldap: foo:

(description=(address_list=(address=(protocol=tcp)(host=foo_home)(port=15940))(address=(protocol=tcp)(host=bar_home)(port=15940)))(connect_data=(service_name=virtual_foo)(failover_mode=(type=session)(method=basic))))

bar:

(description=(address_list=(address=(protocol=tcp)(host=bar_home)(port=15940)))(connect_data=(service_name=bar)))

i'm not sure i'm missing or misunderstanding. can shed light might doing wrong? can provide more info if needed.


Comments