OracleBackup & recovery
RMAN backup jobs in the last 7 days
Status, duration and output size of each RMAN job, newest first.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 150 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN session_key HEADING "KEY" FORMAT 9999994COLUMN input_type HEADING "TYPE" FORMAT A135COLUMN status FORMAT A236COLUMN started FORMAT A167COLUMN ended FORMAT A168COLUMN size_out HEADING "OUTPUT" FORMAT A109COLUMN duration HEADING "DURATION" FORMAT A1010 11SELECT session_key, input_type, status,12 TO_CHAR(start_time, 'YYYY-MM-DD HH24:MI') AS started,13 TO_CHAR(end_time, 'YYYY-MM-DD HH24:MI') AS ended,14 output_bytes_display AS size_out,15 time_taken_display AS duration16FROM v$rman_backup_job_details17WHERE start_time > SYSDATE - 718ORDER BY start_time DESC;Save it as b-ora-rman.sql and run it with SQL> @b-ora-rman.
Open in denrepoRelated tool: RMAN command builder
Helps with
- ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.
- ORA-01194: file %s needs more recovery to be consistent
- ORA-01578: ORACLE data block corrupted (file # %s, block # %s)
- ORA-19815: WARNING: db_recovery_file_dest_size of %s bytes is %s%% used, and has %s remaining bytes available.
Part of these runbooks
More Oracle scripts: Backup & recovery
- RMAN backup history with run time in hoursRun in the target database as SYSDBA, not the recovery catalog. The first report lists every RMAN job (full, incremental and archivelog) with start,…
- Running RMAN job progressPercent complete and time remaining for each RMAN channel that's working right now.
- Datafiles without a recent backupDatafiles with no backup of any kind in the last two days, or none at all. A new datafile added after the last full backup shows up here first.
- RMAN configuration (non-default settings)The persistent CONFIGURE settings stored in the control file, the same list SHOW ALL marks as changed. Check retention and control file autobackup…
- Fast Recovery Area usageFRA size, used and reclaimable space, then what's using it by file type. Real used % is the number that matters: at 100% the database stops archiving…
- Flashback status and restore pointsWhether flashback is on, how far back you can go, and every restore point. A forgotten guaranteed restore point will keep filling the FRA until it's…