ORA-16765 + ORA-16826: apply service state is inconsistent with the DelayMins property with Dataguard Broker 28 October 2010Posted by David Alejo Marcos in Dataguard Broker, Oracle 11.2, Standby.
Tags: Dataguar broker, Oracle 11.2, Standby
Last Saturday I had to start-up our DR Database as the server went down 3 days before due to maintenance.
It should have been an easy task as the DR database was lagging “only” 400 files behind and all archivelogs were on the primary database.
I had the following errors on the Dataguard Broker:
ORA-16765: Redo Apply is running
ORA-16826: apply service state is inconsistent with the DelayMins property
I first thought it was related to how much time we allow the standby database to be behind the primary, but it is not the case.
I did copy all necessary archivelogs from the primary server to the standby server using SCP.
Once I had the necessary archivelogs, I registered using the following script:
for i in 38010 .. 38060 loop
dbms_output.put_line ('alter database register logfile ''/u01/oradata/dbname/arch/1_'||i||'_697561259.arc'';');
1.- 38010 is the first archivelog file the standby was waiting for.
2.- 38060 is the last archivelog being generated by the primary database.
Once archivelogs were registered, the database started to apply them.
With only two logfiles behind, I decided to enable dataguard broker but the same error happened.
The only way I could get around was:
1.- To remove the standby database from the configuration:
DGMGRL> remove database 'dr_database';
Removed database "dr_database" from the configuration
2.- Add the database back to the configuration:
DGMGRL> add database 'dr_database' as connect identifier is 'dr_database';
Database "dr_database" added
3.- And then enable it again:
DGMGRL> enable database 'dr_database';
And voila, it started to work again.
As always, comments are welcome.