Oracle Archived Redo Volume by Day

Displays the daily volume of archived redo logs for a specified number of days. Useful for monitoring redo generation trends, capacity planning, and backup sizing.

oraclesqlcapacity-planningv1.0.0
0 stars0 downloads14 views0 comments
By OracleDba • Created

Code

(19 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/redo_by_day.sql
-- Author       : Tim Hall
-- Description  : Lists the volume of archived redo by day for the specified number of days.
-- Call Syntax  : @redo_by_day (days)
-- Requirements : Access to the v$views.
-- Last Modified: 11/10/2013
-- -----------------------------------------------------------------------------------

SET VERIFY OFF

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

SET VERIFY ON

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!