Check Standby Database Archive Log Gap

 
How to monitor archive log shipping in Oracle databases using Oracle Dataguard technology for standby databases.

Monitor Archivelog Gap:

SELECT ' DGSYNCH' as column_title,
max(p.sequence#) primary_current_log,
max(s.sequence#) secondary_current_log ,
max(p.sequence#)-max(s.sequence#) diff_count
FROM v$log p,
v$archived_log s
WHERE s.dest_id in ('1','2','3')
AND s.applied = 'YES'
ORDER BY s.dest_id;

SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference" FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;

SELECT SEQUENCE#,first_time,next_time ,APPLIED,completion_time FROM V$ARCHIVED_LOG where applied='YES' ORDER BY SEQUENCE#;

If you need more help with database issues, feel free to send me an email (jimmycdo@yahoo.com) and I'll gladly help.

About Jimbart