9 Job Views

A job is a unit of work that you define to automate commonly-run tasks. This chapter provides a description of each job view and its columns. It contains the following sections:

For examples of how to use views, see Examples.

MGMT$CA_TARGETS

The MGMT$CA_TARGETS view provides basic information about a Corrective Action (CA).

Table 9-1 MGMT$CA_TARGETS

Column Description

CA_NAME

Name of the CA

CA_ID

Unique ID of the CA

CA_OWNER

Owner of the CA

CA_DESCRIPTION

Description of the CA

JOB_TYPE

Job type of the CA

TARGET_NAME

Name of the target associated with the CA

TARGET_TYPE

Type of target associated with the CA

TARGET_GUID

Unique ID of the target associated with the CA

IS_BROKEN

Specifies whether the CA is broken

Possible values:

  • 1: CA is broken

  • 0: CA is not broken

MGMT$CA_EXECUTIONS

The MGMT$CA_EXECUTIONS view provides a summary of the Corrective Actions (CA) executions along with the status and targets for each execution.

Table 9-2 MGMT$CA_EXECUTIONS

Column Description

CA_NAME

Name of the CA

CA_OWNER

Owner of the CA

CA_ID

Unique ID of the CA

JOB_TYPE

Job type of the CA

EXECUTION_ID

Execution ID of the CA

SCHEDULED_TIME

Scheduled time for the CA execution

START_TIME

Start time of the CA execution (in Coordinated Universal Time (UTC))

END_TIME

End time of the CA execution (in UTC)

TRIGGERING_SEVERITY

Severity that triggered the CA

TARGET_NAME

Name of the target on which the CA executed

Note: This value can be different from the target with which the CA is associated

TARGET_TYPE

Type of target on which the CA executed

TARGET_GUID

Unique ID of the target on which the CA executed

TIMEZONE_REGION

The time zone region associated with the execution

STATUS

Represents the status of the execution

Possible values:

  • Scheduled: The execution is scheduled

  • Running: The execution has steps that have ran already or are running currently

  • Error: The execution encountered internal errors and terminated

  • Failed: Some steps of the execution ran into failures

  • Succeeded: The execution ran as expected

  • Suspended By User: The user suspended the execution

  • Suspended: Agent Unreachable: The execution cannot continue because the Management Agent cannot be contacted

  • Stopped: The execution is stopped explicitly

  • Suspended on Lock: The execution cannot continue because it is waiting for a logical lock to be obtained

  • Suspended on Event: The execution cannot continue because it is waiting for an internal event (such as a Management Agent restart) or a timeout to occur

  • Suspended on Blackout: The execution cannot proceed because the target it is supposed to run against is under blackout

  • Suspend Pending: The user initiated a suspension of the execution but the execution is still running because some steps cannot be suspended

  • Stop Pending: The user initiated a stop of the execution but the execution is waiting for some steps that could not be stopped

  • Inactive: This status is not used in the current release

  • Queued: The execution is submitted against a queue and there are executions that must complete before this execution can complete

  • Waiting: This execution tracks the next schedule compared to the current scheduled, running, or suspended execution

  • Skipped: The execution did not start and its corresponding schedule was skipped. The skip could be due to many reasons, such as overshooting the start grace period, previous schedule not completed when the scheduled time of this execution passed, or the OMS is down. These executions have no corresponding steps

  • Reassigned: The owner of the job has changed and the new owner has not updated the job to claim ownership.

  • Missing Credentials: The execution is blocked waiting for the user to supply target credentials

  • Action Required: The execution is blocked waiting for user action

  • Suspended on Broken Target: The execution cannot proceed becasue the corresponding target is broken (it has metric collection issues)

STATUS_INTERNAL

Internal status of the execution.

STATUS_CODE

Status code of the execution. The meaning of this column varies depending on the job type and the steps ran for the execution. This code usually maps ot the exit cilde of the step that rolls up the status.

STATUS_BUCKET

The status bucket to which the execution corresponds.

Note: This value can change from one release to another or between patchsets. Oracle recommends that you do not use this value as filtering criteria

STATE_CYCLE

Provides a lifecycle representation of the status of the execution.

Possible values:

  • SCHEDULED: The execution has no steps that are executed. All steps corresponding to the execution are either scheduled to be picked up shortly or later in the future

  • RUNNING: The execution has at least one step that ran or is running while no steps are blocked waiting for external processing

  • SUSPENDED: The execution is blocked and is waiting for external processing or an external event. For example, the user might have suspended the execution or a step of the execution might be waiting for some other system to respond (such as clearing of blackout, or a Management Agent restart). Such an execution cannot proceed until a timeout occurs or the event that the execution is waiting on occurs.

  • FINISHED: The execution has reached a terminal status where no further execution is possible. These executions usually cannot be manipulated in any way (except for failed executions that can be retried, but the retry operation creates a new execution, and does not affect the current execution)

MGMT$JOBS

The MGMT$JOBS view displays information about a job including the job's schedule.

Table 9-3 MGMT$JOBS

Column Description

JOB_NAME

The unique name for the job

JOB_ID

The unique system identifier for the job

JOB_OWNER

The owner or creator of the job

JOB_DESCRIPTION

Optional text describing the job function

JOB_TYPE

The job type. For example, multi-task, SQL script or OS Command.

TARGET_TYPE

The type of target the job was submitted against. Applies to single-target jobs only

IS_LIBRARY

Indicates whether or not the job is part of the job library

IS_RESTARTABLE

Indicates whether the job can be restarted. “0" indicates the job is not restartable. “1" indicates the job is not restartable.

By default, a job is not restartable if the original job owner is deleted and the job is transferred to another administrator.

START_TIME

The scheduled start time. For daily, days of week and days of month schedules, the start_time denotes when the job should start.

END_TIME

For all periodic schedules, the last date (and time) to run the job. For daily, day of week and day of month schedules, only the date portion is used.

TIMEZONE_TYPE

Possible values are:

  • 1 - Repository (deprecated)

  • 2 - Agent

  • 3 - Specified Offset/Region (offset from GMT)

  • 4 - Specified Offset/Region (time zone region name)

TIMEZONE_REGION

The specified time zone region

SCHEDULE_TYPE

Possible values are:

  • 1 - One Time

  • 2 - Interval

  • 3 - Daily

  • 4 - Weekly

  • 5 - Monthly

  • 6 - Yearly

INTERVAL

If schedule_type is interval (2), this is the interval at which the job repeats, in minutes

EXECUTION_HOURS

Indicates the time of day at which the job will execute. Hours are specified using the 24-hour format (0 to 23)

EXECUTION_MINUTES

Indicates the time of day at which the job will execute. Minutes are specified as a number between 0 and 59

MONTHS

For days-of-year job schedules, this indicates the “month" in the schedule

DAYS

For day-of-week/month or day(s) of the week job schedules, this indicates the “day" of the week/month.

Days-of-week specified as numbers 1 (Sunday) to 7 (Saturday).

Days-of-month specified as numbers 1 to 31.

MGMT$JOB_TARGETS

The MGMT$JOB_TARGETS view displays the target(s) the job was submitted against.

Table 9-4 MGMT$JOB_TARGETS

Column Description

JOB_NAME

The unique name for the job

JOB_OWNER

The owner or creator of the job

JOB_ID

Unique id of the submitted job

JOB_TYPE

The job type. For example, multi-task, SQL script or OS Command.

TARGET_NAME

Name of the target the job was submitted against

TARGET_TYPE

The type of target the job was submitted against. Applies to single-target jobs only.

TARGET_GUID

The unique global identifier for the target

MGMT$JOB_EXECUTION_HISTORY

The MGMT$JOB_EXECUTION_HISTORY view displays a summary of job executions along with their status and targets for each execution.

Table 9-5 MGMT$JOB_EXECUTION_HISTORY

Column Description

JOB_NAME

The unique name for the job

JOB_OWNER

The owner of the job

JOB_ID

The unique system identifier for the job

JOB_TYPE

The job type. For example, multi-task, SQL script or OS Command.

EXECUTION_ID

The unique execution identifier

SCHEDULED_TIME

The scheduled time of job execution (using the time zone specified by TIMEZONE_REGION)

START_TIME

The actual time (UTC) the job executed

END_TIME

The actual time (UTC) the job ended execution

TARGET_NAME

Name of the target the job was submitted against

TARGET_TYPE

The type of target the job was submitted against. Applies to single-target jobs only.

TARGET_GUID

The unique global identifier for the target

TIMEZONE_REGION

The time zone region specifying to the job execution

STATUS

The current status of the job execution

Valid values:

  • Scheduled: The job execution is scheduled

  • Running: The job execution had steps that are run already or are running at the moment

  • Error: The job execution encountered internal errors and stopped unexpectedly

  • Failed: Some of the steps of the job execution failed

  • Succeeded: The job execution completed as expected

  • Suspended By User: The user suspended the job execution

  • Suspended: Agent Unreachable: The job execution cannot continue because it cannot contact the Management Agent

  • Stopped: The job execution is stopped

  • Suspended on Lock: The job execution cannot proceed because it waiting for a logical lock to be obtained

  • Suspended on Event: The job execution cannot proceed because it is waiting for an internal event (such as restarting the Management Agent) or a timeout to occur

  • Suspended on Blackout: The job execution cannot proceed because the target that the job is running against is under blackout

  • Suspend Pending: The user initiated a suspension but the job execution is still running because some steps could not be suspended

  • Stop Pending: The user initiated a stop but the job execution is waiting for some steps that could not be stopped

  • Inactive: This status is not used in the current release

  • Queued: The job execution is submitted against a queue and there are other jobs that must complete before this job execution can proceed

  • Waiting: The job execution tracks the next schedule compared to the current scheduled or running or suspended job execution

  • Skipped: The job execution did not start and its corresponding schedule is skipped

  • Reassigned: The job owner is changed and the new owner has not updated to job to claim ownership

  • Missing Credentials: The job execution is blocked and is waiting for the user to supply target credentials

  • Action Required: The job execution is blocked waiting for user action

  • Suspended on Broken Target: The job execution cannot proceed because the corresponding target is broken

STATUS_INTERNAL

The internal integer status of the job execution

STATUS_CODE

The status code of the job execution. This integer usually maps to the exit code of the step that rolls up the status.

STATUS_BUCKET

The status bucket to which the execution corresponds

Note: This value can change between patchsets and Oracle recommends that you do not use this value as filtering criteria

STATE_CYCLE

Provides a lifecycle representation of the status of the execution

Valid values:

  • SCHEDULED: The execution has no steps that are executed yet

  • RUNNING: The execution has at least one step that ran or is running and no steps are blocked

  • SUSPENDED: The execution has blocked steps that are waiting for external processing or an external event

  • FINISHED: The execution has reached where no further execution is possible

SOURCE_EXECUTION_ID

The execution which was retried and caused this execution (EXECUTION_ID). For executions that are not retried, the SOURCE_EXECUTION_ID is the same as the EXECUTION_ID.

RETRIED

This value is set to 1 if this execution is retried. Otherwise, it is set to 0

MGMT$JOB_STEP_HISTORY

The MGMT$JOB_STEP_HISTORY view displays step-level details of job executions.

Table 9-6 MGMT$JOB_STEP_HISTORY

Column Description

JOB_NAME

The unique name for the job

JOB_OWNER

The owner or creator of the job

JOB_ID

The unique system identifier for the job

EXECUTION_ID

The unique execution identifier

STEP_NAME

The name of the job step

START_TIME

The start time of the job step

END_TIME

The end time of the job step

STATUS

The current status of the job execution

TARGET_NAME

Name of the target the job was submitted against

TARGET_TYPE

The type of target the job was submitted against. Applies to single-target jobs only.

TARGET_GUID

The unique global identifier for the target

OUTPUT

Generated job output

STATUS_INTERNAL

The internal integer status of the job step

STATUS_CODE

The status code of the job execution. This integer usually maps to the exit code of the step that rolls up the status

STEP_ID

The step ID of the job step

STEP_TYPE

The step type of the job step

MGMT$JOB_ANNOTATIONS

The MGMT$JOB_ANNOTATIONS view displays a summary of annotations for changes in job status.

Table 9-7 MGMT$JOB_ANNOTATIONS

Column Description

JOB_NAME

The unique name for the job

JOB_OWNER

The owner or creator of the job

JOB_STATUS

The job status. Possible values are as follows:

  • 1: Scheduled

  • 2: Executing

  • 3: Aborted

  • 4: Failed

  • 5: Completed

  • 6: Suspended

  • 7: Agent Down

  • 8: Stopped

  • 9: Suspended/Lock

  • 11: Suspended/Blackout

  • 13: Suspend Pending

  • 15: Queued

  • 16: Failed

  • 17: Waiting

  • 18: Skipped

OCCURRENCE_TIMESTAMP

The time at which the state change occurred

ANNOTATION_MESSAGE

Annotation text

ANNOTATION_TIMESTAMP

The time the annotation was created

ANNOTATED_BY

Enterprise Manager administrator who authored the annotation

MGMT$JOB_NOTIFICATION_LOG

The MGMT$JOB_NOTIFICATION_LOG view displays details of notification deliveries for changes in job status.

Table 9-8 MGMT$JOB_NOTIFICATION_LOG

Column Description

JOB_NAME

The unique name for the job

JOB_OWNER

The owner or creator of the job

JOB_STATUS

The job status.

Possible values:

  • 1: Scheduled

  • 2: Executing

  • 3: Aborted

  • 4: Failed

  • 5: Completed

  • 6: Suspended

  • 7: Agent Down

  • 8: Stopped

  • 9: Suspended/Lock

  • 11: Suspended/Blackout

  • 13: Suspend Pending

  • 15: Queued

  • 16: Failed

  • 17: Waiting

  • 18: Skipped

OCCURRENCE_TIMESTAMP

The time at which the state change occurred

DELIVERY_MESSAGE

The message  indicating the success or failure of the notification delivery

DELIVERY_TIMESTAMP

The time at which the log message was created

MGMT$JOB_FINISHED_EXECS

The MGMT$JOB_FINISHED_EXECS view displays details of historical job execution summary data.

Column Description
Job Information
job_id ID of the job
job_name Name of the job
job_owner Owner of the job
job_type Job type
system_job

Indicates if job is a system job

Posible values:

  • 0: user job (not system job)
  • 1: system job
  • 2: system job that needs to be retried on failure
is_corrective_action Indicates if job is a corrective action
job_status

The current state of the job.

Possible values are:

  • 0: Active
  • 1: Suspended - The job is currently suspended by the user
  • 2: Stopped - The job was stopped
  • 3: Reassigned - The owner was changed typically because the original owner was deleted
  • 4: Expired - The job type was disabled
  • 5: Delete Pending - The job is logically deleted and will be purged
creation_date Creation date of job (UTC: Current UTC, Time Zone (Coordinated Universal Time)
job_target_count Number of targets of the job
Execution Information
execution_id ID of the job execution.
old_status Previous status of the job execution
status

Status of the job execution

Possible values are:

  • 01: Scheduled - The execution is scheduled
  • 02: Executing - Execution has steps that already ran or are running
  • 03: Aborted - Execution ran into internal errors and aborted
  • 04: Failed - Some steps of the execution ran into failures
  • 05: Completed - The execution ran as expected
  • 06: Suspended - User has suspended execution
  • 07: Agent down - Execution cannot continue as the agent cannot be contacted
  • 08: Stopped - Execution was explicitly stopped
  • 09: Suspended due to lock - Execution cannot proceed as it is waiting for a logical "lock" to be obtained
  • 10: Suspended due to event - Execution cannot proceed as it is waiting for an internal event (usually, agent bounce) or a timeout to occur
  • 11: Suspended due to blackout - Execution cannot proceed because the target it is supposed to run against is under blackout
  • 12: Stop Pending - User has initiated a stop of this execution but the execution is waiting for steps that could not be stopped
  • 13: Pending Suspend - User has initiated a suspension of this execution but the execution is still running because some steps could not be suspended
  • 14: Inactive - This status is not used anymore
  • 15: Queued - The execution has been submitted against a queue and there are executions that need to complete before this execution may proceed
  • 16: Failed Retried - Failed retried execution; Not used anymore
  • 17: Waiting - This execution tracks the next schedule compared to the currently scheduled or running or suspended execution
  • 18: Skipped - Execution did not start and its corresponding schedule was skipped. The skip could be due to many reasons, such as overshooting the start grace period, previous schedule still not completed when the scheduled time of this execution passed, OMS was down, etc. These executions have no corresponding steps
  • 19: Delete Pending - Execution is logically deleted and will be purged
  • 20: ReAssigned - The owner of the job has been changed and the new owner has not updated the job to "claim ownership"
  • 21: Suspended/Credentials - Execution is blocked waiting for the user to supply target credentials
  • 22: Action Requires - Execution is blocked awaiting user action
  • 23: Run Limit Exceeded - Dummy Status Used for Notification only
  • 24: Stop Processing - Performing stop operation
  • 25: Stop Pending/Broken - Execution could not be stopped due to error
  • 26: Suspended/Broken - Execution cannot proceed as the corresponding target is broken (has metric collection issues)
  • 27: Ignored - Execution was ignored. Not used anymore
  • 28: CA Broken - Execution cannot proceed due to broken CA. Used internally only
status_bucket

The status bucket to which the job execution belongs.

Current Posible Values:

  • 990: Active (Status Bucket)
    • 1: Scheduled
    • 2: Running
    • 22: Action Required
    • 6: Suspended
  • 5: Succeeded (Status Bucket)
  • 4: Problems (Status Bucket)
    • 3: Error
    • 4: Failed
    • 8: Stopped
    • 14: Inactive
    • 18: Skipped
    • 20: Reassigned
    • 21: Credentials Missing

Note:

These values may vary slightly depending on the version you use.
status_detail Details of the job execution status

Posible values:

  • STATUS_DETAIL_NONE= 0 - no additional details
  • STATUS_DETAIL_ALL = -1 - used only for searchingfor STOP(PENDING)
  • STATUS:DETAIL_STOP_PND_NO_SCH_NEXT=60 -- Stop pending do NOT schedule next
  • DETAIL_STOP_PND_SCH_NEXT= 61 -- Stop pending schedule next
  • DETAIL_STOPPED_BY_RTL = 62 -- Stopped due to RTL: schedule next. not used
  • DETAIL_STOPPED_BY_UPGRADE= 63 - Stopped by upgrade: schedule nextFor completed (with errors)
  • DETAIL_COMPLETED_ERRORS := 71 - completed with errorsFor WAITING
  • STATUSDETAIL_START_WAITING = 77; - started waiting
  • DETAIL_GRACE_WAITING= 78; - started waiting for specific time for SKIPPED status;
  • DETAIL_SKIPPED_USER_SUSPEND = 81 - skipped because user suspended execution
  • DETAIL_SKIPPED_SYSTEM_SUSPEND = 82 skipped because system suspended execution
  • DETAIL_SKIPPED_RUNNING = 83 - skipped because already running
  • DETAIL_SKIPPED_EXPIRY = 84 - skipped because execution expired
  • DETAIL_SKIPPED_USER = 85 - skipped because of user action
  • DETAIL_SKIPPED_SYSTEM = 86 - skipped because of system action
  • DETAIL_SKIPPED_UNMIGRATE = 87 - skipped because of unmigrated target used
  • DETAIL_SKIPPED_REASSIGNED = 89 - skipped because the owner of the job has changed
expected_start_time Expected start time of the job execution (UTC: Current UTC, Time Zone (Coordinated Universal Time)
start_time Start time of the job execution (UTC: Current UTC, Time Zone (Coordinated Universal Time)
end_time End time of the job execution (UTC: Current UTC, Time Zone (Coordinated Universal Time)
queue_id ID of the queue where the job was executed
queue_index Index of the job execution in queue
triggering_severity The GUID of the severity or policy violation that triggered the execution, if the execution is of a corrective action. It can then be used to query information from mgmt_violations table.

Example GUID:

123ABCDEF12A12A1A123A1A12345ABC
deleted_target_guid GUID of deleted target of the job
base_priority Base priority score for the execution. The score is an integer value; a higher value implies a higher priority for the execution.

We compute and cache (or retrieve from cache) an execution's priority based on various properties of the job or the target(s) it operates on.

The priority is determined by:

  • the lifecycle status of the target it operates on
  • the target list index of the execution
  • if a system job, whether it is a critical job or high priority job, the calculated values from different determines are then added up and build the base priority

The higher base priority value the priority of the execution is higher. The priority can be additionally increased or decreased in between. Decreased if for example steps of given execution are constantly failing due to error or increased if the time between marking the steps ready and current time is growing and steps are not getting picked up.

count_steps_completed Number of steps completed of the job execution
count_total_steps Number of total steps of the job execution.
retry_count Number of retries of the job execution.
count_num_of_steps Total number of steps executed as part of this job
count_num_of_params Number of parameters of the job execution.
Target Information
target_count Number of job targets.
target_guid GUID of the target of the job.
target_name Name of the target of the job.
target_type Type of the target of the job.
target_task_name Task name of the target of the job.