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: |
2.4 |
Default schedule: |
10 6 * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & (version like ‘9%’)] |
Parameters
Name |
Default value |
Description |
backup expire time |
24 |
Backup expire time (in hours). |
Job Summary
- Purpose: The purpose of this job is to monitor and verify the status of RMAN backups directly from the Oracle database using dynamic performance views.
- Why: This job is crucial for ensuring data recoverability in Oracle databases. By monitoring RMAN backup statuses, the job helps identify potential issues such as missing backups or backups that have not been executed within a specified time frame. Effective monitoring can prevent data loss and maintain compliance with data protection policies.
- Manual checking: You can check the RMAN backup status manually in the database by issuing the following SQL commands:
SELECT HANDLE, TAG, STATUS, START_TIME, COMPLETION_TIME, ELAPSED_SECONDS, DELETED FROM V$BACKUP_PIECE WHERE DELETED = 'NO' ORDER BY START_TIME DESC;
Details and Implementation
- This monitoring job specifically targets Oracle instances with a version starting with ‘9′, where Oracle’s Recovery Manager (RMAN) is utilized.
- The job is implemented via a stored procedure in Oracle named “rman_backup_status.” This procedure checks RMAN backup pieces from the “V$BACKUP_PIECE“ view, focusing on essential information like device type, handle, tag, status, start time, completion time, and elapsed time.
- Depending on the outcome, the procedure may return different statuses:
- Status 0: Indicates successful checking, providing details of the last backup’s end time, duration, and the handles of backup pieces.
- Status 1: Indicates no backup execution within the specified hours, defined by the “backup expire time” parameter.
- If an exception occurs during procedure execution, an error is logged into a custom error table “DBW_ERRORS.”
Monitoring and Reporting Features
- The job has a default schedule set to run daily at 6:10 AM.
- Acknowledgements are enabled, allowing control center operators to acknowledge alerts generated by this task.
- The job includes a dependency on itself, ensuring its proper cleanup in case of failures during execution.
Output and Reporting
The output of this job includes the following reports:
RMAN Backup Statistics
- Periodic backup statistics are displayed in a table format with details about each backup piece:
Backup ended |
Elapsed Time (sec) |
Handle |
REC ID |
Device Type |
Tag |
Status |
- This reporting facilitates quick overviews of the most recent backup activities.
RMAN Configuration
- The current configuration of RMAN settings is listed, providing transparency about the backup environment and any custom settings that might affect operations.
- Presents data in a table format specifying configuration parameters and their respective values.
In summary, this dbWatch Control Center job is an essential tool designed for proactive monitoring and management of RMAN backups in Oracle databases, particularly those using older versions starting with ‘9′. It ensures data protection strategies are adhered to and potential backup issues are addressed promptly.