select LOG_ARCHIVED-LOG_APPLIED “LOG_GAP” from
(SELECT MAX(SEQUENCE#) LOG_ARCHIVED
FROM V$ARCHIVED_LOG WHERE DEST_ID=1 AND ARCHIVED=’YES’),
(SELECT MAX(SEQUENCE#) LOG_APPLIED
FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND APPLIED=’YES’);

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.