Query to check the Standby Sync Status - Oracle DR

Please use the below query to find Standby Sync Status.

SELECT 'Last applied  : '                         Logs, 
       sequence#, 
       To_char(next_time, 'DD-MON-YY:HH24:MI:SS') TIME 
FROM   v$archived_log 
WHERE  sequence# = (SELECT Max(sequence#) 
                    FROM   v$archived_log 
                    WHERE  applied = 'YES') 
UNION 
SELECT 'Last received : '                         Logs, 
       sequence#, 
       To_char(next_time, 'DD-MON-YY:HH24:MI:SS') TIME 
FROM   v$archived_log 
WHERE  sequence# = (SELECT Max(sequence#) 
                    FROM   v$archived_log) 
UNION 
SELECT 'Log Differnce: ' Logs, 
       (SELECT Max(sequence#) 
        FROM   v$archived_log) - (SELECT Max(sequence#) 
                                  FROM   v$archived_log 
                                  WHERE  applied = 'YES'), 
       ' '               TIME 
FROM   v$archived_log; 

Comments