Thursday, October 6, 2011

Script to find out if Archlog Files backed up in last 24 Hours

To see the same result for datafiles, follow the link

To see if archived logs got backed up in last 24 hours and how many are still sitting on the disks, use the script below

SELECT backedup||' out of  '||archived||' archive logs backed up'  "Archlog files backed up",
       ondisk "Archlog files on disk"
  FROM (select count(*) archived
          from v$archived_log where completion_time > sysdate - 1),
       (select count(*) backedup from v$archived_log
         where backup_count > 0
           and completion_time > sysdate - 1),
       (select count(*) ondisk from v$archived_log
         where archived = 'YES' and deleted  = 'NO')

1 comment: