Oracle – obtain the amount of redo files

I found a query which can be used to estimate what is the amount of storage for database log files and also identify when you have peak periods:

   1: SELECT Start_Date,
   2:        Start_Time,
   3:        Num_Logs,
   4:        Round(Num_Logs * (Vl.Bytes / (1024 * 1024)),
   5:              2) AS Mbytes,
   6:        Vdb.NAME AS Dbname
   7:   FROM (SELECT To_Char(Vlh.First_Time,
   8:                        'YYYY-MM-DD') AS Start_Date,
   9:                To_Char(Vlh.First_Time,
  10:                        'HH24') || ':00' AS Start_Time,
  11:                COUNT(Vlh.Thread#) Num_Logs
  12:           FROM V$log_History Vlh
  13:          GROUP BY To_Char(Vlh.First_Time,
  14:                           'YYYY-MM-DD'),
  15:                   To_Char(Vlh.First_Time,
  16:                           'HH24') || ':00') Log_Hist,
  17:        V$log Vl,
  18:        V$database Vdb
  19:  WHERE Vl.Group# = 1
  20:  ORDER BY Log_Hist.Start_Date,
  21:           Log_Hist.Start_Time;

2 Responses to “Oracle – obtain the amount of redo files”

  1. Daniel Says:

    Seems that your previous job @Oracle was really helpful :D

  2. cornel Says:

    I have to agree with that..and it is a good place to work – not as good as Adobe of course :)

Leave a Reply