ORASOLU TOOLBOX · AUTOMATION & DEVOPS

Automation Diagnostics

Practical resources for investigating failed jobs, scripts, scheduled tasks and automation workflows.

ORASOLU TOOLBOX · AUTOMATION & DEVOPS

Investigate automation from the evidence

When automation fails, start with the execution state, error information and surrounding database activity. These queries provide a structured starting point for troubleshooting recurring operational failures.

01 · JOB STATE

Review failed jobs

Find scheduler jobs whose recent executions did not succeed.

SELECT
    owner,
    job_name,
    status,
    error#,
    actual_start_date
FROM dba_scheduler_job_run_details
WHERE status <> 'SUCCEEDED'
ORDER BY actual_start_date DESC
FETCH FIRST 30 ROWS ONLY;
02 · JOB ERRORS

Review job errors

Inspect scheduler job error details recorded for failed executions.

SELECT
    owner,
    job_name,
    status,
    error#,
    additional_info
FROM dba_scheduler_job_run_details
WHERE status <> 'SUCCEEDED'
ORDER BY actual_start_date DESC
FETCH FIRST 20 ROWS ONLY;
03 · RUNNING

Find long-running jobs

Review currently running scheduler jobs and their elapsed execution time.

SELECT
    owner,
    job_name,
    session_id,
    running_instance,
    elapsed_time
FROM dba_scheduler_running_jobs
ORDER BY elapsed_time DESC;
04 · SESSIONS

Correlate job sessions

Inspect database sessions associated with currently running automated work.

SELECT
    s.sid,
    s.serial#,
    s.username,
    s.status,
    s.event,
    s.sql_id
FROM v$session s
WHERE s.program LIKE '%(J%'
ORDER BY s.sid;
05 · INVALID

Check post-failure objects

Look for invalid objects that may indicate an unsuccessful deployment or maintenance task.

SELECT
    owner,
    object_type,
    object_name,
    status
FROM dba_objects
WHERE status = 'INVALID'
ORDER BY owner, object_type, object_name;
06 · SYSTEM

Check database state

Confirm the database state while investigating an automation failure.

SELECT
    name,
    open_mode,
    database_role,
    log_mode
FROM v$database;
ORASOLU TOOLBOX · AUTOMATION & DEVOPS

Automation failures should leave evidence.

Correlate the failed task with its execution history, database state and surrounding workload. The goal is to identify what failed, when it failed and what changed around it.