Wednesday, 11 July 2012

Script to Report Datafile Archive Status

Script to Report Datafile Archive Status

This script shows the status of your datafile backup.

REM LOCATION:   Backup Recovery\Reports
REM FUNCTION:   Show database datafile Archive status
REM TESTED ON:,, 8.1.5, 8.1.7, 9.0.1,,
REM PLATFORM:   non-specific
REM REQUIRES:   sys.v_$datafile, sys.v_$backup
REM************************* Oracle Administration *************************

COLUMN name format a43
COLUMN arc heading 'Backup Status'
SET lines 132 pages 59 feedback off
Ttitle "Database File Backup Status"
SELECT NAME, a.status, DECODE (b.status, 'Active', 'Backup', 'Normal') arc,
       enabled, bytes, change#, TIME ARCHIVE
  FROM sys.v_$datafile a, sys.v_$backup b
 WHERE a.file# = b.file#;
CLEAR columns

No comments:

Post a Comment