RMAN backup status
Job details
Name: |
RMAN backup status |
Platform: |
Oracle |
Category: |
Availability |
Description: |
Checks status of RMAN backup from V$RMAN_BACKUP_JOB_DETAILS performance view. |
Long description: |
Task checks the status of RMAN backup from V$RMAN_BACKUP_JOB_DETAILS performance view. (For 8.x) |
Version: |
1.4 |
Default schedule: |
10 6 * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & (version like ‘8%’)] |
Parameters
Name |
Default value |
Description |
backup expire time |
24 |
Backup expire time (in hours). |
Job Summary
- Purpose: This monitoring job is designed to check the status of RMAN backups for Oracle database instances, specifically version 8.×.
- Why: Ensuring the successful completion of recent RMAN backups is crucial for data recovery and integrity. By monitoring these backups, potential failures or issues can be detected early, minimizing the risk of data loss and ensuring database availability.
- Manual checking: To manually check the RMAN backup status in the database, the following SQL command can be issued:
SELECT DEVICE_TYPE, HANDLE, TAG, STATUS, START_TIME, COMPLETION_TIME, ELAPSED_SECONDS, DELETED FROM V$BACKUP_PIECE WHERE DELETED = 'NO' ORDER BY START_TIME DESC;
Implementation Overview
- The procedure ‘rman8i_backup_status’ is used to monitor and report on the backup status by accessing the ‘V$BACKUP_PIECE‘ view in Oracle.
- It checks for backups that have not been deleted and have started after a specified expiration time derived from the system’s current date time minus the backup expiry time (expressed in hours) which is maintained in the ‘dbw_parameters’ table.
Function |
Description |
Task Implementation |
A PL/SQL procedure that fetches backup details from V$BACKUP_PIECE, computes elapsed time, checks if backups have been executed within the set timeframe, and verifies the completion status of the backups. |
Error Handling |
Updates the monitoring status and logs errors to the ‘DBW_ERRORS‘ table in the event of an exception during the execution of the monitoring task. |
Report Summary
The job generates reports that provide detailed statistics and information on RMAN backup activities:
- RMAN backup statistics: Displays key backup metrics such as completion time, elapsed time, backup piece handle, record identifier (recid), device type, tag, and status for each backup, sorted by completion time.
- RMAN backup sets: Showcases data from ‘V$BACKUP_SET‘ view detailing included controlfile, backup type, number of pieces, block size, and identifies incremental levels among other details—helpful for a comprehensive review of backup configurations and their completion statuses.
The reports facilitate quick and informed decisions regarding backup health and operational status, thereby supporting effective database management practices. These automated reports reduce the need for manual checks and can highlight issues that need immediate attention.