Database Architecture   «Prev  Next»

Lesson 11 Looking at redo log information
Objective Find and interpret key information about Oracle online redo logs and their history.

Looking at Oracle Redo Log Information

Online redo logs record every change so Oracle can guarantee durability and recover from failures. As a DBA, you’ll routinely check:
  • Layout: groups, members (paths), sizes, current group
  • Health: member status, multiplexing, archiver state, FRA space
  • Cadence: how often you switch logs (for sizing & recovery objectives)
The views you’ll use most are V$LOG, V$LOGFILE, V$LOG_HISTORY, V$ARCHIVED_LOG, and V$ARCHIVE_DEST.

Inventory: groups, members, sizes

One row per group; shows size, member count, current/active state, and whether archived:


SELECT l.group#,
       l.sequence#,
       ROUND(l.bytes/1024/1024) AS size_mb,
       l.members,
       l.archived,              -- YES/NO
       l.status                 -- CURRENT | ACTIVE | INACTIVE
FROM   v$log l
ORDER  BY l.group#;

List the physical files (members) for each group and their status/path:


SELECT lf.group#,
       lf.member,               -- full path
       lf.type,                 -- ONLINE | STANDBY
       lf.status                -- VALID | INVALID | STALE | DELETED
FROM   v$logfile lf
ORDER  BY lf.group#, lf.member;

Current status & quick checks

Which group is Oracle writing to now?


SELECT group#, sequence#, status
FROM   v$log
WHERE  status = 'CURRENT';

Archive destinations and any errors (watch FRA fullness & archiver health):


SELECT dest_id, destination, status, error
FROM   v$archive_dest
ORDER  BY dest_id;

Switch cadence & sizing signals

Recent log switches (helps size redo logs for a steady interval, e.g., ~15–30 minutes at peak):


SELECT sequence#, first_time, next_time
FROM   v$log_history
ORDER  BY first_time DESC
FETCH  FIRST 20 ROWS ONLY;

Switches per hour (last 24 hours), useful to spot bursts:


SELECT TO_CHAR(first_time, 'YYYY-MM-DD HH24') AS hour_slot,
       COUNT(*) AS switches
FROM   v$log_history
WHERE  first_time > SYSDATE - 1
GROUP  BY TO_CHAR(first_time, 'YYYY-MM-DD HH24')
ORDER  BY hour_slot DESC;

Operational guidance

Example outputs (illustrative)


GROUP# SEQUENCE# SIZE_MB MEMBERS ARCHIVED STATUS
------ --------- ------- ------- -------- --------
1      10429     2048    2       YES      INACTIVE
2      10430     2048    2       YES      INACTIVE
3      10431     2048    2       NO       CURRENT

Common pitfalls

Redo Log Info - Quiz

Click the Quiz link below to see how well you have learned the material so far.
Redo Log Info - Quiz

SEMrush Software 11 SEMrush Banner 11