ORA-16849 ORA-16816 After Uncompleted Data Guard Switchover

For some reason, DG ( Data Guard ) switchover command is incomplete with following warnings:

Database Error(s):
 ORA-16849: a previous switchover from this database was interrupted 
            and aborted
 ORA-16816: incorrect database role

After detailed checks, it is confirmed that database role has been changed successfully.

-- on old primary database
--
SQL> select open_mode, database_role from v$database;

OPEN_MODE            DATABASE_ROLE
-------------------- ----------------
MOUNTED              PHYSICAL STANDBY

-- on old standby database
--
SQL> select open_mode, database_role from v$database;

OPEN_MODE            DATABASE_ROLE
-------------------- ----------------
MOUNTED              PRIMARY

So the issues is the final role change has not been recognized by the DG broker, so we have to rebuild the Data Guard Broker Configuration when the Databases have been restarted:

DGMGRL> remove configuration;
DGMGRL> create configuration 'PRIMDB' AS PRIMARY DATABASE IS 
       'PRIMDB' CONNECT IDENTIFIER IS 'PRIMDB'; 
DGMGRL> add database 'STDBYDB' AS CONNECT IDENTIFIER IS 'STDBYDB' 
        maintained as physical;
DGMGRL> enable configuration;
DGMGRL> show configuration;
DGMGRL> show database verbose 'PRIMDB';
DGMGRL> show database verbose 'STDBYDB';

Advertisement

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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: