for a given day or since the last reboot which ever is recent list the log switch timings in ascending order
prompt
accept days prompt 'Enter no of days before'
set verify off
set linesize 80
select to_char(first_time,'YYYY/MM/DD HH24') "Date - HOfDay",count(1) from V$LOG_HISTORY where first_time > sysdate -&days
group by to_char(first_time,'YYYY/MM/DD HH24') order by to_date(to_char(first_time,'YYYY/MM/DD HH24'),'YYYY/MM/DD HH24');
accept days prompt 'Enter no of days before'
set verify off
set linesize 80
select to_char(first_time,'YYYY/MM/DD HH24') "Date - HOfDay",count(1) from V$LOG_HISTORY where first_time > sysdate -&days
group by to_char(first_time,'YYYY/MM/DD HH24') order by to_date(to_char(first_time,'YYYY/MM/DD HH24'),'YYYY/MM/DD HH24');
Comments