Mani's Blog

December 14, 2012

Error: ORA-16751: failed to switchover to physical standby database. Both Oracle DB says Physical Standby

I ran the switchover to dataguard box.  I ran into issue where both database became physical standby.

Problem:

DGMGRL for Linux: Version 11.1.0.7.0 – 64bit Production

Copyright (c) 2000, 2005, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/oracle
Connected.
DGMGRL> swtichover to xnodb01c
Unrecognized command “swtichover”, try “help”
DGMGRL> switchover to xnodb01c
Performing switchover NOW, please wait…
Error: ORA-16751: failed to switchover to physical standby database

Failed.
Unable to switchover, primary database is still “xnodb01cdg”

Solution:

Now I have to choose one database and promote as primary.   Following steps worked well for me.

SQL> select database_role from v$database;

DATABASE_ROLE
—————-
PHYSICAL STANDBY

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 2.6724E+10 bytes
Fixed Size            2160272 bytes
Variable Size         8321501552 bytes
Database Buffers     1.8254E+10 bytes
Redo Buffers          146423808 bytes
Database mounted.
SQL> alter database recover managed standby database cancel;
alter database recover managed standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery not active

SQL> alter database recover managed standby database finish;

Database altered.

SQL> ALTER database commit to switchover to primary with session shutdown;

Database altered.

SQL> alter database open;

Database altered.

SQL>  select database_role from v$database;

DATABASE_ROLE
—————-
PRIMARY

SQL> alter system switch logfile;

System altered.

SQL>

Now other DB functioning as Physical Standby with no issues.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: