RMAN incremental backup status
Job details
Name: |
RMAN incremental backup status |
Platform: |
Oracle |
Category: |
Availability |
Description: |
Checks the status of RMAN incremental backup (input_type ‘DB INCR‘) from V$RMAN_BACKUP_JOB_DETAILS performance view. |
Long description: |
Checks the status of RMAN incremental backup (input_type ‘DB INCR‘) from V$RMAN_BACKUP_JOB_DETAILS performance view. |
Version: |
2.0 |
Default schedule: |
20 6 * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & _cdb_v_rman_backup_job_details = ‘1′ & is_pluggdb = ‘0′ ]/.[is_rds = ‘0′] |
Parameters
Name |
Default value |
Description |
backup expire time |
168 |
Backup expire time (in hours). If no valid backup exists within this time threshold a warning is returned. |
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. |
container ID |
1 |
The ID of the container to which the data pertains. |
return status when OLD backup |
1 |
Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup is older than “backup expire time” parameter value. |
return status when backup NOT IMPLEMENTED |
1 |
Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup is not implemented. |
Job Summary
- Purpose: The purpose of this job is to monitor the status of RMAN (Oracle Recovery Manager) incremental backups by checking the performance view V$RMAN_BACKUP_JOB_DETAILS in an Oracle database.
- Why: This job is essential to ensure that RMAN incremental backups are completed successfully within a given timeframe. Monitoring the status helps in quick detection of failures, running states, or if backups are older than a specified threshold. This proactive monitoring aids in maintaining database availability and data safety.
- Manual checking: You can check the status of RMAN incremental backups manually by executing the following SQL query:
SELECT status, input_type, start_time, end_time FROM V$RMAN_BACKUP_JOB_DETAILS WHERE input_type = 'DB INCR';
Important Components and Logic
- The job involves various SQL checks and uses specific parameters to evaluate the state of the incremental backups.
- Each state of the backup (e.g., RUNNING, FAILED) has different alert statuses like ALARM or WARNING designated to it to flag issues effectively in dbWatch monitoring setup.
Key SQL Scripts Involved
- “_priv_read_v_rman_backup_job_details” and “_cdb_v_rman_backup_job_details” are critical checks to ensure appropriate read privileges and compatibility with Oracle database requirements.
- Dependency functions like “f_get_incr_rman_output” help in fetching detailed error texts when failures are detected, enhancing the problem identification process.
Embedded Procedures
- “rman_incr_backup_status” is a core procedure that contains the logic to determine the status of the backups — whether the backup is running, failed, or completed and also checks if the last successful backup is within an acceptable window as defined by the “backup expire time”.
- Decision points within the procedure adjust the status and informational messages based on backup outcomes and duration since the last backup.
Monitoring Outcome
- The job provides a detailed report on various aspects of RMAN backups, including size, duration, and status over time, through formatted tables in dbWatch reports.
- Effective monitoring ensures database administrators can preemptively tackle backup issues before they impact database availability or lead to data loss scenarios.
Implementation Details
- The actual SQL and procedural implementation within dbWatch are geographically optimized to handle the specific nuances of Oracle RMAN backups, considering aspects like Oracle Container Databases (CDBs) and backup configurations.
- Guard checks for necessary privileges and backup configurations reflect the automated pre-checks before monitoring logic execution.
Understanding these components, administrators can tailor their database monitoring strategy, leveraging dbWatch to maintain optimal database operations and ensure compliance with data safety standards.