Skip to main content

Posts

Showing posts with the label Script to find-out hourly log switch count

Oracle Database Find-out hourly log switch count.

 Find-out hourly log switch count This will help you to figure out: – The transnational work load on your database. – The total number of archive log files being generated. – To schedule or Re-schedule your RMAN transnational log backup policy. // Script to find-out hourly log switch count: set pages 1000 select to_char(COMPLETION_TIME,'dd mon yyyy hh24') as Hour, thread#, round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives from v$archived_log group by to_char(COMPLETION_TIME,'dd mon yyyy hh24'),thread# order by 1; // Script to find-out daily log switch count:   SELECT to_char(first_time, 'dd-mon-yyyy') as "Date",  count(*) as "Daily log switch count"  FROM V$log_history  GROUP BY to_char(first_time, 'dd-mon-yyyy');  SELECT A.*, Round(A.Count*B.AVG/1024/1024) Daily_average_MB  FROM ( SELECT To_Char(First_Time,'YYYY-MM-DD') Day,  Count(1) Count,  Min(RECID) M...