PROBLEM:

I was getting Warning: ORA-16854: apply lag could not be determined in dgmgrl show configuration command. , despite my dataguard replication was working fine and no errors were in any of the alert logs. I tried validate database command , still warning was there.


DGMGRL> show configuration;

Configuration - my_dg_leo

Protection Mode: MaxPerformance
Members:
leo - Primary database
leodr - Physical standby database
Warning: ORA-16854: apply lag could not be determined


Fast-Start Failover: DISABLED

Configuration Status:

SQL> select process,status from gv$managed_standby;

PROCESS STATUS
--------- ------------
DGRD ALLOCATED
ARCH CLOSING
DGRD ALLOCATED
ARCH CONNECTED
ARCH CONNECTED
ARCH CLOSING
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE

PROCESS STATUS
--------- ------------
MRP0 APPLYING_LOG

12 rows selected.

SOLUTION:

The solution i tried is , cancelling the recovery and restarting the MRP again on standby db.



SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

DGMGRL> show configuration;

Configuration - my_dg_leo

Protection Mode: MaxPerformance
Members:
leo - Primary database
leodr - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS (status updated 9 seconds ago)

And the error is gone.

If you faced similar issue and used any other alternative workaround to fix the issue. please update in the comment section. It will be helpful to the DBA community.