dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Scripts Library/oracle/#71
Script #71
oracle
Replicationread-onlyMin Version: 11g

Oracle Data Guard Apply and Transport Lag

Shows transport and apply lag on the standby. Used to monitor DR readiness and potential data loss window.

#data-guard#standby#lag
oracle · sql
-- Standby üzerinde
SELECT name, value, unit, time_computed
FROM   v$dataguard_stats
WHERE  name IN ('transport lag','apply lag','apply finish time');

SELECT process, status, thread#, sequence#, block#
FROM   v$managed_standby
WHERE  process IN ('MRP0','RFS');
Operational Notes & Remediation Guidance

Verify in a staging environment prior to running in production. This is a read-only diagnostic query; it does not acquire exclusive locks.

Production Safety & Execution Standards
  • This script is designed for read-only diagnostics; it does not alter schema or modify data directly.
  • Prior to executing on production systems under high load, verify the target database version (Min. Version: 11g).
  • Exercise caution with mutating actions (e.g., terminating sessions or dropping indexes) referenced in the notes section.