← Redo & Archive Logs
Oracle · Redo & Archive Logs

How to check archived redo volume by day in Oracle

Show total archived redo size (GB) per day for the last N days in Oracle from V$ARCHIVED_LOG.

Tested on11g12c18c19c21c23ai26ai

Bucket archived redo by day for the last N days and show total size in GB. Cleaner daily view than daily-redo-generation when you only care about recent history and want the number in GB.

SET VERIFY OFF

ACCEPT p_days NUMBER PROMPT 'How many days back: '

SELECT TRUNC(first_time) AS day,
       ROUND(SUM(blocks * block_size) / 1024 / 1024 / 1024, 2) AS size_gb
FROM   v$archived_log
WHERE  TRUNC(first_time) >= TRUNC(SYSDATE) - &&p_days
GROUP BY TRUNC(first_time)
ORDER BY TRUNC(first_time);

SET VERIFY ON
redoarchived logcapacity planning