Standby Log File Status (vslog.sql)
What This Script Does
Section titled “What This Script Does”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.
The Script
Section titled “The Script”rem vslog.sqlremttitle 'Redo Log File Status'remcol 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'rembreak on reportcompute sum of kbytes on reportremselect 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_timefrom v$standby_log;
Parameters
Section titled “Parameters”The script prompts for:
- None - this script requires no parameters
-- Basic usage@vslog.sql
Sample Output
Section titled “Sample Output” 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