Tag Archives: dataguard

Mind The Gap…

During some scheduled data centre maintenance an Oracle Dataguard standby database got out of sync with its primary, after the standby was restarted it failed to apply the logs and catch up. I eventually got to the bottom of the problem thanks to Steve Harville The primary had it’s weekly full backup on Friday AFTER the standby was shut down and having backed up the archive log files, deleted them. Of course when the standby was restarted it was missing a few archive logs and couldn’t catch up with the primary. A quick rman recovery of the logs from the backup and Dataguard sprang back into life!

The clue to the problem was here:
SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH      CONNECTED             0          0          0          0
ARCH      CONNECTED             0          0          0          0
ARCH      CONNECTED             0          0          0          0
ARCH      CLOSING               1      43606      53249        568
RFS       IDLE                  1      43607      34518          9
RFS       IDLE                  0          0          0          0
MRP0      WAIT_FOR_GAP          1      43289          0          0
RFS       IDLE                  0          0          0          0

The MRP0 (Managed Recovery Process) process status ‘WAIT_FOR_GAP’ is what indicates the missing logs and Steve’s helpful script told me what to recover on the primary.