Incorrect database role [message #485924] |
Sat, 11 December 2010 15:18 |
mateenaslam
Messages: 21 Registered: November 2010 Location: Islamabad, Pakistan
|
Junior Member |
|
|
Hi,
I am getting error ORA-16816: incorrect database role. The reason is my switch over to standby become failed and now both primary and standby databases showing 'database_role' as 'Physical Standby'.
My question is how to manually set 'database_role' to 'PRIMARY' on primary database.
--------------------------------------------
DGMGRL> show configuration
Configuration - dgproj
Protection Mode: MaxPerformance
Databases:
repl - Primary database
Error: ORA-16816: incorrect database role
dgrepl - Physical standby database
--------------------------------------------
|
|
|
|
Re: Incorrect database role [message #485971 is a reply to message #485924] |
Sun, 12 December 2010 05:59 |
John Watson
Messages: 8938 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I have seen the reverse situation, where Data Guard Broker thought that both databases were primary. I would suggest that the first thing to do is to disable and remove the configuration, and (very important) delete all the config files. Then check reality: connect to both databases with SQL*Plus, and see if they are, in fact, primary or standby.
If you do have a primary and a standby, create a new configuration. Easy.
If both database are in fact standby, you will have to activate one of them as a primary, create a new configuration, and then try to reinstate the other as a standby. That might be a bit harder.
|
|
|
Re: Incorrect database role [message #486001 is a reply to message #485971] |
Sun, 12 December 2010 12:24 |
mateenaslam
Messages: 21 Registered: November 2010 Location: Islamabad, Pakistan
|
Junior Member |
|
|
Yes, i have connect to both database by SQL*Plus and got both database_role as 'PHYSICAL STANDBY'. Any guide line how to activate one as a primary ?
--------------------------------------------
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
--------------------------------------------
|
|
|
Re: Incorrect database role [message #486011 is a reply to message #486001] |
Sun, 12 December 2010 14:07 |
John Watson
Messages: 8938 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote:Any guide line how to activate one as a primary ?
I can't add anything to the description of the command that you'll find in your Data Guard Concepts and Admin guide.
|
|
|
Re: Incorrect database role [message #486067 is a reply to message #486011] |
Mon, 13 December 2010 07:12 |
mateenaslam
Messages: 21 Registered: November 2010 Location: Islamabad, Pakistan
|
Junior Member |
|
|
Thanks for Data Guard Concepts and admin guide reference. This is how i made my database back to Primary
-------------------------------------------------------------
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database recover managed standby database cancel;
SQL> alter database recover managed standby database finish;
SQL> ALTER database commit to switchover to primary with session shutdown;
SQL> alter database open;
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PRIMARY
-------------------------------------------------------------
|
|
|
|
Re: Incorrect database role [message #486069 is a reply to message #486067] |
Mon, 13 December 2010 07:28 |
babuknb
Messages: 1736 Registered: December 2005 Location: NJ
|
Senior Member |
|
|
Yes, Your correct, Oracle also suggest manually need to fix this issue.
Quote:
ORA-16816: incorrect database role
Cause: The Data Guard broker detected that this database object had a database role that was different from the recorded database role in the Data Guard Configuration. This could be the result of a failed switchover or failover operation, or an out-of-band switchover or failover operation done to the database.
Action: Manually fix the database to convert it to the appropriate database role, then issue an ENABLE DATABASE command to reenable the database object.
[Updated on: Mon, 13 December 2010 10:43] by Moderator Report message to a moderator
|
|
|
|
Re: Incorrect database role [message #605831 is a reply to message #574904] |
Wed, 15 January 2014 03:25 |
|
shubha.dalvi
Messages: 1 Registered: March 2012 Location: Mumbai
|
Junior Member |
|
|
Hi
I am facing the same problem but after reconfiguration of broker still it is showing below error after reinstation of failed primary db
DGMGRL> show database racdb statusreport
STATUS REPORT
INSTANCE_NAME SEVERITY ERROR_TEXT
* ERROR ORA-16816: incorrect database role
racdb2 ERROR ORA-16782: instance not open for read and write access
|
|
|