Attention: These scripts use two substitution variables for the number of days you want to look back at. Most of the times you will want to use a large value for master (say 16 days) and a smaller value for the detail (say half the master: 8 days):
prompt prompt Robot Script 16a: Log archive frequency (master) prompt ########################################################## column day format a10 column "Log Switches" format 999999 select to_char(first_time,'YYYY-MM-DD') Day,count(*) "Log Switches" from v$log_history where first_time > SYSDATE-&Number_Archive_Days_Master group by to_char(first_time,'YYYY-MM-DD') order by 1 / prompt prompt Robot Script 16b: Log archive frequency (detail) prompt ########################################################## column "First DML" format a20 column day format a10 set pagesize 300 select to_char(first_time,'DD-MM-YYYY') Day, sequence# LSN, to_char(first_time,'HH24:MI:SS') "First DML" from v$log_history where first_time > SYSDATE-&Number_Archive_Days_Detail order by sequence# /