RMAN backup status


Job details

Name: RMAN backup status
Platform: Oracle
Category: Availability
Description: Checks the status of RMAN backup from V$RMAN_BACKUP_JOB_DETAILS performance view.
Long description: Checks the status of RMAN backup from V$RMAN_BACKUP_JOB_DETAILS performance view.
Version: 3.2
Default schedule: 10 6 * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & (version like ‘10.2%’)]

Parameters

Name Default value Description
backup expire time 24 Backup expire time.
return status when backup RUNNING 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup status value is RUNNING.
return status when backup FAILED 2 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup status value is FAILED.

Job Summary

SELECT * FROM V$RMAN_BACKUP_JOB_DETAILS;

Implementation Details

This monitoring job includes several major components reflected in its implementation:

  1. Oracle instance selection based on specific versions (like ‘10.2%’) and the presence of an RMAN engine.
  2. Execution of SQL scripts to manage and store backup job details in a custom table.
  3. An Oracle function to fetch detailed error text from the RMAN output, useful for diagnosing failed backups.
  4. A procedure to evaluate the status of backups, which registers different states (completed, running, failed) and records these events with timestamps and performance stats in a database table.

Dependency and Cleanup

The job has dependencies on several database objects:

On failure, clean-up operations are triggered to ensure there is no residual corrupt data affecting subsequent backups.

Database Report Generation

Backup Reporting:

Title Description SQL Query
RMAN Backup History Displays chronological RMAN backup details including status and time taken. SELECT start_time as ‘Backup Started’, end_time as ‘Backup Ended’, status, TIME_TAKEN_DISPLAY as ‘Elaps Time’, round(output_bytes/1048576) as ‘Output MB’, round(input_bytes/1048576) as ‘Input MB’ FROM backup_job_details ORDER BY 1 DESC
Backup Size History Shows the history of backup sizes graphically. SELECT start_time as ‘Backup Date’, round(output_bytes/1048576) as ‘Output (MB)’ FROM V$RMAN_BACKUP_JOB_DETAILS ORDER BY 1 ASC
RMAN Backup Pieces Lists details of individual RMAN backup pieces. SELECT completion_time as ‘Backup Ended’, round(elapsed_seconds) as ‘Elapsed Time’, handle, recid, device_type as ‘Device Type’, tag, status FROM V$BACKUP_PIECE WHERE deleted = ‘NO’ ORDER BY completion_time DESC
RMAN Configuration Displays current configuration settings for RMAN. SELECT name, value FROM V$RMAN_CONFIGURATION

These reports serve to provide an in-depth review of backup processes, configuration settings, and historical data to maintain the health and effectiveness of backup systems.