Sample Header Ad - 728x90

Help with simple check for Oracle Dataguard on 19c

0 votes
1 answer
2477 views
I am new to Oracle and needing help just getting a quick script to check Oracle Dataguard. Do any of you have a simple script that could be used to just give me a quick status on dataguard? Just a quick check, if dataguard is in sync or not. I was given the below query, and it appears the script just simply tells the log gap count between the primary and stand by. Does that seem reasonable or is there a better approach? In this case, if the log gap is more than say, 3, then dataguard needs to be investigated?
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');
Asked by jmichaelwDBA (51 rep)
Dec 29, 2023, 03:36 PM
Last activity: May 27, 2025, 05:01 PM