Skip to content

Standby Log File Status (vslog.sql)

This script monitors standby redo log file status specifically, showing the configuration and current state of standby logs used in Data Guard environments. Essential for verifying standby log configuration and monitoring their usage.

rem vslog.sql
rem
ttitle 'Redo Log File Status'
rem
col group# format 99 heading 'GROUP'
col thread# format 99 heading 'THREAD'
col sequence# format 9999999 heading 'SEQ'
col mbytes format 99999999 heading 'SIZE|(MB)'
col members format 9 heading 'M'
col archived format a1 heading 'A'
col status format a10 heading 'STATUS'
col first_change# format 999999999999999 heading 'FIRST CHANGE'
col first_time format a17 heading 'FIRST TIME'
rem
break on report
compute sum of kbytes on report
rem
select thread#
, group#
, sequence#
, bytes/1024/1024 mbytes
-- , members
, decode( archived, 'YES', 'Y', 'NO', 'N', '?' ) archived
, status
, first_change#
, to_char( first_time, 'mm/dd/yy hh24:mi:ss' ) first_time
from v$standby_log;

The script prompts for:

  • None - this script requires no parameters
-- Basic usage
@vslog.sql
Redo Log File Status
THREAD GROUP SEQ SIZE A STATUS FIRST CHANGE FIRST TIME
------ ----- ------- --------- - ---------- ----------------- -----------------
1 11 154 50 Y UNASSIGNED 123456789012345 01/05/25 14:20:15
1 12 155 50 Y UNASSIGNED 123456789012890 01/05/25 14:25:30
1 13 0 50 N UNASSIGNED 0
2 14 152 50 Y UNASSIGNED 123456789011234 01/05/25 14:18:22
2 15 153 50 Y UNASSIGNED 123456789011789 01/05/25 14:23:37
2 16 0 50 N UNASSIGNED 0