Jump to content
Camillelola

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

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 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
Camillelola

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:

http://www.dba-oracle.com/fast_start_failover.htm

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

http://dba-oracle.com/googlesearchsite_proc.htm?cx=000522505899594707971%3A4-ldikxixw4&cof=FORID%3A10&ie=UTF-8&q=Data+guard+failover&sa=Search&siteurl=www.dba-oracle.com%2Ffast_start_failover.htm&ref=www.google.com%2F&ss=7331j3261415j19

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

×