denrepo

OracleData Guard

Archive gaps and last applied sequence

Missing log sequences the standby is waiting for, then the last applied sequence per thread. Compare with the current sequence on the primary.

Run on standby

Not yet verified. How scripts are tested

ora-dg-gap.sql
1CLEAR COLUMNS2SET LINESIZE 100 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN thread#        HEADING "THREAD"        FORMAT 9994COLUMN low_sequence#  HEADING "GAP FROM"      FORMAT 999999995COLUMN high_sequence# HEADING "GAP TO"        FORMAT 999999996COLUMN last_applied   HEADING "LAST APPLIED"  FORMAT 999999997 8SELECT thread#, low_sequence#, high_sequence#9FROM v$archive_gap;10 11SELECT thread#, MAX(sequence#) AS last_applied12FROM v$archived_log13WHERE applied = 'YES'14GROUP BY thread#15ORDER BY thread#;

Save it as ora-dg-gap.sql and run it with SQL> @ora-dg-gap.

Open in denrepo

Part of these runbooks

More Oracle scripts: Data Guard