Backup log Check 10g (‘old style’ backups)
Job details
Name: | Backup log Check 10g (‘old style’ backups) |
Platform: | Oracle |
Category: | Availability |
Description: | Checks for errors in a log file (e.i. backup log). For backups not using RMAN. |
Long description: | Checks for errors in a log file (e.i. backup log). For backups not using RMAN, but using a script that uses ‘alter tablespace xx backup;’ and creates a log file. (Oracle 10g only). |
Version: | 2.5 |
Default schedule: | 15 5 * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & version like ‘10%’ & _priv_read_dba_directories = ‘1′] |
Parameters
Name | Default value | Description | ||
---|---|---|---|---|
backup log name | backup.log | The name of the backup log file. | ||
backup log path | null | The path name of the backup log file which is used to create directory object. | ||
backup log directory name | DBW_BACKUP_DIR | The name of the directory object created with the DDL – “create directory”. | ||
backup log error text | ORA- | Defines which strings (errors) the Check must look for. Values for this parameter must be | ||
backup log line HWM | 0 | Each time the Check read the backup log, it registers how many rows have been checked. | ||
backup log max lines | 200000 | If the backup log has more lines than the value of this parameter, then the Check terminates | ||
backup log max elapsed time | 60 | Define the maximum running time the Check can execute (values are in seconds). If the execution ‘ | ||
backup log error text allowed | null | Specifies the error strings which are excluded. | ||
backup log confirm text | successful | The Check loop throughout the log file, searching for a “confirm” text. If the Check do not find at least | ||
backup log date format | dd-mm-yyyy hh24:mi | If a value is assigned to the parameter |
||
backup log date position | backup finished | If the log-file has a date/time stamp in it, you can have the Check to check how | ||
backup log nls lang | English | Defines handling of language-specific date-format used by the dbwatch parameter “backup log date format”. | ||
backup log expire time | 24 | You can specify how old the log-file is allowed to be before the Check returns the |
Job Summary
- Purpose: The main purpose of this job is to monitor and check for errors in the backup logs for Oracle database instances, particularly those that do not use RMAN but utilize scripts that handle backups with commands like “alter tablespace xx backup;” This job specifically targets Oracle versions around 10g.
- Why: Monitoring backup logs is critical for ensuring the successful storage of backups and early detection of issues or failures in the backup process. This job is essential to detect potential errors early, minimize data loss risk, and ensure data recovery capabilities are intact.
- Manual checking: Manual checks can be done by reviewing the backup logs located at specified paths or by querying against the Oracle database to inspect entries related to backup operations.
Detailed Analysis
The job targets Oracle database instances specifically configured to generate backup logs in an “old style” not using RMAN. It checks logs for any errors by identifying error strings defined in parameters and ensures no critical error messages like “ORA-” exist unless explicitly allowed by configuration. It’s set to handle specific tasks such as:
- Creating directory objects necessary for accessing backup logs.
- Verifying and adjusting directory paths as needed.
- Scanning backup logs and determining their status based on error strings and confirmation messages within set performance thresholds.
Dependencies and Implementation
This job depends on certain Oracle privileges and setups like having the CREATE ANY DIRECTORY privilege. It involves several SQL procedures and checks that compile into a detailed examination of specified backup log directories for errors. Each run logs outcomes and adjusts its pointers to only read new lines in subsequent executions, optimizing performance.
Key Properties and Settings:
- Backup Log Path and Name: Specifies the location and the name of the log file.
- Error Texts and Confirmation Texts: Defines error strings to look for and success markers in the log files.
- High Water Mark (HWM): Keeps track of the lines already read to avoid rechecking the same lines in subsequent operations.
- Maximum Lines and Execution Time: Sets limits on the number of lines to read and maximum allowed time for the check, ensuring the job does not overrun resources.
- Date-time considerations: Handles logs with date-time stamps to ensure logs are not just error-free but also current.
- Directory Handling: Ensures directory objects for accessing logs exist and are correctly linked to actual file paths, handling the creation and recreation of directories as needed.
Output and Reporting
Upon running the check, if errors are detected or confirm texts are not found, a warning status is reported. Configurations ensure that old, confirmed-good, but possibly outdated backup logs don’t falsely pass checks.
Scheduling and Automation
This job is scheduled to run automatically, ensuring frequent checks and minimal human intervention. Notifications and detailed reporting help in maintaining clear communication about the system status and any immediate attention required.
In conclusion, this monitoring job is pivotal for maintaining integrity and reliability in database backups in a non-RMAN environment for Oracle 10g databases, ensuring that backup processes are error-free and up-to-date thus safeguarding against potential data losses.