Job scheduling check
Job details
Name: | Job scheduling check |
Platform: | Oracle |
Category: | Availability |
Description: | Detecting failed scheduled jobs. The STATUS column in the Oracle dictionary view DBA_SCHEDULER_JOB_RUN_DETAILS is used to detect scheduled jobs that have failed. |
Long description: | The STATUS column in the Oracle dictionary view DBA_SCHEDULER_JOB_RUN_DETAILS is used to detect scheduled jobs that have failed. |
Version: | 3.03 |
Default schedule: | 5,25,45 * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & ten_and_above = ‘1′] |
Parameters
Name | Default value | Description |
---|---|---|
ignore job names | AUTO_SPACE_ADVISOR_JOB,FGR$AUTOPURGE_JOB | Job names excluded from being checked (comma separated). You can use % (percent sign) to represent wild card characters. |
return status on failed job | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when a job have status FAILED (and are not in “ignore job names” list). |
last run | 01.03.2010 00:00 | The last date the dbWatch Job scheduling check was run. Only jobs run after this date will be checked (column actual_start_date in the dba_scheduler_job_run_details view). Value format DD.MM.YYYY HH24:MI |
Job Summary
- Purpose: The purpose of this job is to monitor scheduled jobs in an Oracle database, particularly focusing on detecting failures in these jobs through specific dictionary views.
- Why: This job is important to ensure that the administrative tasks scheduled through Oracle’s job scheduler are executing as expected, and to promptly detect and report any failures. This helps in maintaining the overall health and performance of the database.
- Manual checking: You can check this manually in the database by issuing these SQL commands:
SELECT OWNER, JOB_NAME, STATUS, ERROR#, ACTUAL_START_DATE FROM dba_scheduler_job_run_details WHERE STATUS = 'FAILED';
Core Functionality
The monitoring job operates by accessing the Oracle dictionary view named “DBA_SCHEDULER_JOB_RUN_DETAILS“ to identify and report on scheduled jobs with a status of ‘FAILED’.
This job leverages a procedure named “job_scheduling_check” to efficiently collate and report this data.
Parameters
The job includes functionality to exclude specific job names from its checks and dynamically accept thresholds for failures, enhancing its flexibility and range of application.
Additionally:
- It maintains state by remembering the last run time of the job.
- Allows alteration of the return status based on failed jobs for better integration with monitoring systems.
Dependencies
Dependencies include:
- A reliance on the “DBA_SCHEDULER_RUNNING_JOBS“ and “DBA_SCHEDULER_JOB_RUN_DETAILS“ views for real-time job status information.
- An inclusion of a custom table (“job_scheduling_tab_ignore”) to maintain a list of job names that should be ignored during the checks.
Report Structures
The job supports extensive reporting, including:
- Lists of all running jobs.
- A comprehensive view of all scheduled jobs’ details, including owner, job name, status, scheduled times, and others.
- Filters to highlight failed jobs, which are essential for quick diagnostics and corrections.
Implementation Details
The procedure “job_scheduling_check” is responsible for:
- Filtering job records that need attention (failed jobs since the last invocation).
- Generating a concise report on each invocation which details job failures if any, or a simple status check if no job failures are detected.
- Exception handling to account for any unexpected issues during its execution.
Upgrades
- Procedural code is available to accommodate various versions of the job, ensuring it remains compatible with other dbWatch tasks and suitable for incremental upgrades.
- Upgrades are designed to enhance performance, extend capabilities, or resolve bugs.
Installation Criteria
This job is structured to automatically install on Oracle instances (version 10 or later) where the engine is active, adhering to dbWatch’s deployment strategies.
Overall, this job is a critical component within the dbWatch Control Center, aimed at ensuring the smooth functioning and reliability of scheduled jobs within Oracle databases.