How to find STANDBY Recovery GAP

We have a 5-Node RAC along with one STANDBY Database for Reporting purposes. Although we a schedule job that will routinely reocer our Standby database but once in a while I need to know when was the last archived file applied or how long it has been since Standby was recovered.

–The following query will give no. of hours in GAP as well last archived applied since the Standby has been recovered:

SELECT ROUND( (SYSDATE – Max(COMPLETION_TIME)) * 24) “STANDBY Recovery GAP”,TO_CHAR(Max(COMPLETION_TIME),’Dy DD-Mon-YYYY HH24:MI:SS’) as “Last ARCH Applied”
FROM GV$ARCHIVED_LOG
WHERE APPLIED =’YES’
AND INST_ID = 1
GROUP BY INST_ID
ORDER BY INST_ID;

1 Comment

Leave a comment