Jump to content

How to make dataguard switchover seamlessly

Recommended Posts

Hi Guys,

I am new to Oracle. In my Dataguard configuration on a 12c environment, when I perform a switchover from primary (foo) to standby (bar) and then try to SQL plus in with user@foo, I receive the "ORA-011033: ORACLE initialization or shutdown in progress" error instead of being able to connect to the new primary(bar).

Now, I know that this is because the connection is still pointing to the foo address instead of the bar address, and according to many articles, you need to create a new "virtual" service to handle the different connections, as well as a trigger to stop/start this service after a rolechange.

I did this and with the service_names parameter set to this new "virtual" service, a switchover will work and can also switch back but when trying to SQL plus with user@foo it throws ORA-011033. The trigger is useless and the service continues to run on both foo and bar because it seems that having that parameter set overrides whatever the trigger tries to do.

Now if I don't define that parameter, my switchover works fine, and the triggers do their job, and when I sqlplus user@foo, it will correctly redirect me to the bar address. However, when I try to switchover back to foo, I receive the following in the DG alert log:

Redo transport problem detected: redo transport to database foo has the following error:

ORA-16047: DGID mismatch between destination setting and target database
08/05/2016 16:01:02 
Initialization of connection failed. 
Expected destination db_unique_name is foo.
Database actually reached is bar 
Failed to send message to site foo. Error code is 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


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'


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:




I'm not sure what I'm missing or misunderstanding. Can anyone shed any light as to what I might be doing wrong? Can provide more info if needed.


Thanks & Regards

Share this post

Link to post
Share on other sites

Hi Camillelola, sans welcome to the forum!

Are you looking a switchover of failover?

Is this a failover to physical standby or

logical standby?

You might want to explore the fast start failover technique.  Please read:


I have lots of good notes on DG failover/switchover automation:


Good luck!


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now