Section A.6. DBMS_SCHEDULER


A.6. DBMS_SCHEDULER

This package is used to schedule jobs in the database to be executed at some given point in time and with some specified periodicity. It contains all the programs necessary to create and maintain jobs, job classes, schedules, programs, windows, and window groups.

CREATE_JOB

This program creates a job to be executed either immediately or later. It is overloaded as four versions, all procedures.

ProcedureVersion 1 (no named objects)

This version is the quickest way to create a job. It accepts all of the components needed to creat a job (e.g., calendar, job action) defined in a granular manner without explicit names.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job.

job_type

VARCHAR2

Type of the job. Valid values are PLSQL_BLOCK, STORED_PROCEDURE, and EXECUTABLE.

job_action

VARCHAR2

What the job actually does. It depends on the previous parameter. If job_type is PLSQL_BLOCK, this is the entire PL/SQL block. STORED_PROCEDURE requires the name of the stored procedure. EXECUTABLE requires the name of the OS executable with the full path.

number_of_arguments

PLS_INTEGER

If the job's action, as shown in the previous parameter, accepts some input parameter, then the number of parameters is shown here. Default is 0.

start_date

TIMESTAMP WITH TIMEZONE

Date and time the job is to start. If this is NULL (the default), then the job starts immediately.

repeat_interval

VARCHAR2

Calendar string, which determines when the job should repeatfor example, "FREQ=DAILY BYHOUR=3". For a complete list of values in the calendar string, see Chapter 8. Default is NULL, which indicates that the job will never be repeated; it will be executed only once at the start_date.

end_date

TIMESTAMP WITH TIMEZONE

If set, this indicates when the job should stop executing. Default is NULL, which means never stop.

job_class

VARCHAR2

Job classes determine the resource consumption profile of the job as well as the logging level, etc. Oracle comes with a predefined job class, "DEFAULT_JOB_CLASS". If this parameter is not specified, then this job belongs to the default job class.

enabled

BOOLEAN

Specified if this job is enabled to be run. Default is FALSE, which indicates that the job is created disabled by default. You must set this parameter to TRUE to enable it at creation.

auto_drop

BOOLEAN

If set to TRUE, the job is dropped after execution. Set it to FALSE to avoid having it be dropped. Default is TRUE.

comments

VARCHAR2

Comments on the job.


ProcedureVersion 2 (named schedule but inline action)

Identical to Version 1, except that the schedule is specified as a named schedule, not in calendar string format.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job.

schedule_name

VARCHAR2

Name of the schedule created earlier. If this schedule is owned by a different user, then the owner's name is prefixed, (e.g., SCHED_ADMIN.EVERY_DAY). Because the schedule defines when the job starts, ends, and how often it runs, the corresponding parameters (start_date, end_date, and repeat_interval) are absent.

job_type

VARCHAR2

Type of job. Valid values are PLSQL_BLOCK, STORED_PROCEDURE, and EXECUTABLE.

job_action

VARCHAR2

What the job actually does. It depends on the previous parameter. If job_type is PLSQL_BLOCK, this is the entire PL/SQL block. STORED_PROCEDURE requires the name of the stored procedure. EXECUTABLE requires the name of the OS executable with the full path.

number_of_arguments

PLS_INTEGER

If the job's action (shown in the previous parameter) accepts some input parameter, the number of parameters is shown here. Default is 0.

job_class

VARCHAR2

Job classes determine the resource consumption profile of the job as well as the logging level, etc. Oracle comes with a predefined job class, "DEFAULT_JOB_CLASS". If this parameter is not specified, then this job belongs to the default job class.

enabled

BOOLEAN

Specified if this job is enabled to be run. Default is FALSE, which indicates that the job is created disabled by default. You must set this parameter to TRUE to enable it at creation.

auto_drop

BOOLEAN

If set to TRUE, the job is dropped after execution. Set it to FALSE to avoid having it be dropped. Default is TRUE.

comments

VARCHAR2

Comments on the job.


ProcedureVersion 3 (named program as action but inline schedule)

Identical to Version 2 except that it accepts the calendar as a string and a named program. With this version, you use a named program instead of declaring the job action on the fly.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job.

program_name

VARCHAR2

Name of the named program, which you must have defined earlier. If the program is owned by a different owner, then the program name must be qualified with the owner's name (e.g., JOB_ADMIN.CALC_INT). Because the program defines all of the characteristics of the action, the corresponding parameters (e.g., job_action) are not present.

start_date

TIMESTAMP WITH TIMEZONE

Date and time the job is to start. If this is NULL (the default), then the job starts immediately.

repeat_interval

VARCHAR2

Calendar string, which determines when the job should repeatfor example, "FREQ=DAILY BYHOUR=3". For a complete list of values in the calendar string, see Chapter 8. Default is NULL, which indicates that the job will never be repeated; it will be executed only once at the start_date.

end_date

TIMESTAMP WITH TIMEZONE

If set, this indicates when the job should stop executing. Default is NULL, which means never stop.

job_class

VARCHAR2

Job classes determine the resource consumption profile of the job as well as the logging level, etc. Oracle comes with a predefined job class, "DEFAULT_JOB_CLASS". If this parameter is not specified, then this job belongs to the default job class.

enabled

BOOLEAN

Specified if this job is enabled to be run. Default is FALSE, which indicates that the job is created disabled by default. You must set this parameter to TRUE to enable it at creation.

auto_drop

BOOLEAN

If set to TRUE, the job is dropped after execution. Set it to FALSE to avoid having it be dropped. Default is TRUE.

comments

VARCHAR2

Comments on the job.


ProcedureVersion 4 (named program and named schedule)

The simplest of all job creation procedures. If you create a job using this version, you have to specify only the program name and the schedule name, both of which must have been defined earlier.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job.

program_name

VARCHAR2

Name of the named program, which you must have defined earlier. If the program is owned by a different owner, then the program name must be qualified with the owner's name (e.g., JOB_ADMIN.CALC_INT). Because the program defines all of the characteristics of the action, the corresponding parameters (e.g., job_action) are not present.

schedule_name

VARCHAR2

Name of the schedule created earlier. If this schedule is owned by a different user, then the owner's name is prefixed, e.g., SCHED_ADMIN.EVERY_DAY. Because the schedule defines when the job starts, ends, and how often it runs, the corresponding parameters (start_date, end_date, and repeat_interval) are absent.

job_class

VARCHAR2

Job classes determine the resource consumption profile of the job as well as the logging level, etc. Oracle comes with a predefined job class, "DEFAULT_JOB_CLASS". If this parameter is not specified, then this job belongs to the default job class.

enabled

BOOLEAN

Specified if this job is enabled to be run. Default is FALSE, which indicates that the job is created disabled by default. You must set this parameter to TRUE to enable it at creation.

auto_drop

BOOLEAN

If set to TRUE, the job is dropped after execution. Set it to FALSE to avoid having it be dropped. Default is TRUE.

comments

VARCHAR2

Comments on the job.


CREATE_JOB_CLASS

This procedure creates a job class that can be subsequently associated with jobs. A job class need not contain any job. When jobs are defined as a part of a class, the attributes of the job class, such as logging level, resource consumer group, and so on, are also applied to the jobs in that class.

Parameter name

Datatype

Description

job_class_name

VARCHAR2

Name of the job class. Must be unique in the database.

resource_consumer_group

VARCHAR2

Name of the resource consumer group defined in the database earlier. There is no default. If not specified, NULL is assumed. In that case, the job class is not associated with any resource plans in the database and is not subject to any restrictions on resources.

service

VARCHAR2

Service name (if the database has service names defined on it) to which the job class must belong.

logging_level

PLS_INTEGER

Amount of log information written on the jobs under this job class. Three possible values are:

  

DBMS_SCHEDULER.LOGGING_OFF indicates that no log information is written.

  

DBMS_SCHEDULER.LOGGING_RUNS indicates that logs are written only when jobs are run.

  

DBMS_SCHEDULER.LOGGING_FULL indicates that logs are written on every operation on the job (e.g., ALTER, DROP) in addition to the usual runs.

log_history

PLS_INTEGER

How many days worth of logs are kept. After this many days, the log entries are deleted.

comments

VARCHAR2

Comments on the job class.


STOP_JOB

This procedure stops a running job.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job to be stopped. You can also specify a series of jobs separated by commas (e.g., "JOB1,JOB2", etc.).

  

Alternately, you may specify the name of a job class. If a job class is specified, then all the jobs under the job class are stopped.

force

BOOLEAN

If the job is currently running, this procedure attempts to stop the job using an interrupt. However, the job may not be stopped immediately, and the stop job command will have to wait. If this parameter is set to TRUE, then the procedure kills the job slaves. Default is FALSE.


RUN_JOB

This procedure runs a job now, even if it is not scheduled to execute right now.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job.

use_current_session

BOOLEAN

If set to TRUE, the job runs in the current session and the messages appear on the user's screen immediately. This is very useful in helping to debug a job. If set to FALSE, then the job runs in the background as another session, just as it normally would. Default is TRUE.


COPY_JOB

This procedure creates a new job from an old job's definition. It is very useful to be able to quickly create a job "like" an existing one, but with a new name.

Parameter name

Datatype

Description

old_job

VARCHAR2

Name of the job whose attributes are to be copied.

new_job

VARCHAR2

Name of the new job that is created as the old one. The new job is created disabled; you must explicitly enable it.


DISABLE

This procedure is used to disable components of the job system. It is very useful in cases where a temporary halt in scheduling is necessary. For example, suppose that you have a job to calculate and apply interest to accounts, but the program has a bug that is currently being investigated. Until that is fixed, you want to make sure the apply_interest job does not run. Instead of dropping it, you can disable it. Disabling a job preserves all the information about the job, but does not execute it. Later on, you can enable it.

This procedure is used to disable all types of Scheduler componentsjobs, job classes, schedules, programs, windows, and window groups. Based on the object specified, the behavior differs.

Parameter name

Datatype

Description

name

VARCHAR2

Name of the object (prefixed by owner, if this is an application) that needs to be disabled. You can also include a comma-delimited list to specify many objects.

force

BOOLEAN

Based on the input name, this parameter shows different properties. Basically, if set to TRUE, it forces the dependent objects to be altered as well, Default is FALSE, which does not alter the dependent objects.


ENABLE

This procedure is the corollary to the DISABLE procedure . It is used to enable disabled objects. Like its cousin, it is used to enable all types of Scheduler componentsjobs, job classes, schedules, programs, windows, and window groups.

Parameter name

Datatype

Description

name

VARCHAR2

Name of the object (prefixed by owner, if it is an application) that needs to be enabled. You can also include a comma-delimited list to specify many objects.


DROP_JOB

This procedure drops a job when it is no longer needed.

Parameter name

Datatype

Description

job_name

VARCHAR2

Name of the job to be dropped. You can also specify a series of jobs separated by commas (e.g., "JOB1,JOB2", etc.).

  

Alternatively, you may specify the name of a job class. If a job class is specified, then all the jobs under the job class are dropped.

  

Note that you cannot drop a job class by specifying it here. You have to use DROP_JOB_CLASS procedure .

force

BOOLEAN

If the job is currently running, then it can't be dropped. Setting this parameter to TRUE makes the procedure attempt to stop the job first before dropping it. The default is FALSE, which results in an error when DROP_JOB is issued.


DROP_JOB_CLASS

This procedure drops a job class when it is no longer needed.

Parameter name

Datatype

Description

job_class_name

VARCHAR2

Name of the job class to be dropped. You can also specify a series of jobs separated by commas (e.g., "JOB_CLASS1,JOB_CLASS2", etc.).

force

BOOLEAN

If you have jobs defined under this class, you cannot drop the job class. Setting this parameter to TRUE marks the jobs disabled and allows dropping of the job class. Default is FALSE. If a job belonging to the job_class is running now, it is not affected.


CREATE_SCHEDULE

This procedure creates a named schedule that can be used while creating a job. This allows you to use a named schedule instead of a string of calendar values.

Parameter name

Datatype

Description

schedule_name

VARCHAR2

Name of the schedule. It must be unique in the database.

start_date

TIMESTAMP WITH TIMEZONE

Date when the schedule starts to take effect. Default is NULL, which means immediately.

repeat_interval

VARCHAR2

Calendar string that determines how often the schedule should be repeated, (e.g., "FREQ=DAILY; BYHOUR=3"). For a complete list, see Chapter 8.

end_date

TIMESTAMP WITH TIMEZONE

Date when the schedule will end. Default is NULL, which means it never ends.

comments

VARCHAR2

Comments on the schedule.


DROP_SCHEDULE

This procedure drops a named schedule.

Parameter name

Datatype

Description

schedule_name

VARCHAR2

Name of the schedule to be dropped.

force

BOOLEAN

If the schedule is referenced by a job or a window, then you cannot drop it. If this parameter is set to TRUE, it will disable the job or the window and then drop the schedule. Default is FALSE.


CREATE_WINDOW

This program creates a named window, which can be used as a schedule for a job. The program is overloaded into two versions, both procedures.

ProcedureVersion 1 (named schedule)

Creates a named window. The schedule of the window (i.e., the information on how often the window is to be repeated) is specified as a named schedule, which must have been defined earlier.

Parameter name

Datatype

Description

window_name

VARCHAR2

Name of the window. Must be unique in the database.

resource_plan

VARCHAR2

Resource Manager plan under which this window will be placed. You must specify this parameter, and you must supply a valid Resource Manager plan.

schedule_name

VARCHAR2

Named schedule this window will follow.

duration

INTERVAL DAY TO SECOND

How long this window will stay open.

window_priority

VARCHAR2

Priority of the window. Valid values are LOW and HIGH; default is LOW. This parameter is only relevant if two windows overlap. The priority determines which window will close to make room for the other.

comments

VARCHAR2

Comments on the window.


ProcedureVersion 2 (inline schedule)

Identical to Version 1, but the schedule is specified as an inline calendar string.

Parameter name

Datatype

Description

window_name

VARCHAR2

Name of the window. Must be unique in the database.

resource_plan

VARCHAR2

Resource Manager plan under which this window will be placed. You must specify this parameter, and you must supply a valid Resource Manager plan.

start_date

TIMESTAMP WITH TIMEZONE

Date and time the job is to start. If this is NULL (the default), then the job starts immediately.

repeat_interval

VARCHAR2

Calendar string that determines when the job should repeat (e.g., "FREQ=DAILY BYHOUR=3"). For a complete list of calendar string values, see Chapter 8. The default is NULL, which indicates that the job will never be repeated; it will be executed only once at the start_date.

end_date

TIMESTAMP WITH TIMEZONE

If set, this indicates when the job should stop executing. Default is NULL, which means that it will never stop.

duration

INTERVAL DAY TO SECOND

How long this window will stay open.

window_priority

VARCHAR2

Priority of the window. Valid values are LOW and HIGH; default is LOW. This parameter is only relevant if two windows overlap. The priority determines which window will close to make room for the other.

comments

VARCHAR2

Comments on the window.


CREATE_WINDOW_GROUP

This procedure creates a named window group, that is, a collection of windows. A window group can be used as a schedule for a job.

Parameter name

Datatype

Description

group_name

VARCHAR2

Name of the window group. Must be unique in the database.

window_list

VARCHAR2

Comma-separated list of windows in the window group (e.g., WIN1,WIN2). You can have a window group with no members yet in it. Specifying NULL creates such a window group.

comments

VARCHAR2

Comments on the window group.


ADD_WINDOW_GROUP_MEMBER

While you create a window group, you can define it as having no windows in it. You can add windows to it later on using this procedure. You can also add windows to a window group that already has windows in it.

Parameter name

Datatype

Description

group_name

VARCHAR2

Name of the window group, which must have been already created.

window_list

VARCHAR2

Comma-separated list of windows to be added to the window group (e.g., WIN1,WIN2).


DROP_WINDOW

This procedure drops a window.

Parameter name

Datatype

Description

window_name

VARCHAR2

Name of the window to be dropped.

force

BOOLEAN

If a schedule is referenced by a job or a window, then you cannot drop it. When this parameter is set to TRUE, it will disable the job or the window and then drop the schedule. Default is FALSE.


OPEN_WINDOW

This procedure manually opens a window. A window that has not yet reached its scheduled time is considered closed. You can manually open a closed window using this procedure. Doing so will make sure the jobs associated with the window are run.

Parameter name

Datatype

Description

window_name

VARCHAR2

Name of the window to be opened.

duration

INTERVAL DAY TO SECOND

How long the window will stay open.

force

BOOLEAN

If the window is already open, you cannot reopen it; this procedure will return an error. When this parameter is set to TRUE, the window opening will not cause an error but instead will reset the duration of the window to the duration specified in the previous parameter, starting from that instant.


CLOSE_WINDOW

This procedure allows you to manually force the closing of a window before its scheduled closing time.

Parameter name

Datatype

Description

window_name

VARCHAR2

Name of the window to be closed. The window must currently be open or an error will be generated.


A.6.1. Scheduler Data Dictionary Views

This section summarizes the columns in the data dictionary views that are relevant to scheduling .

DBA_SCHEDULER_JOBS

This view shows the jobs defined in the database.

Column name

Description

OWNER

Owner of the job.

JOB_NAME

Name of the job.

CLIENT_ID

If the user specified the client identifier for the session while creating a job, it is recorded here. You can set the client identifier by calling DBMS_SESSION.SET_IDENTIFIER.

GLOBAL_UID

If the user is a global (or enterprise) user, the global user id is recorded here.

JOB_TYPE

The type of job; valid values are EXECUTABLE, PLSQL_BLOCK, and STORED_PROCEDURE.

JOB_ACTION

What the job does. If it is a PL/SQL code segment, then the entire segment is shown here. If it is an executable or a stored procedure, its name is recorded here.

START_DATE

Start time of the job in the TIMESTAMP datatype.

REPEAT_INTERVAL

Calendar string that specifies the schedule of the job (e.g., "FREQ=DAILY; BYHOUR=2"). (See the section "Calendar Strings" in Chapter 8.)

ENABLED

Whether the job is enabled (TRUE or FALSE).

STATE

Current state this job is in (e.g., SCHEDULED, RUNNING, SUCCEEDED, FAILED).

RUN_COUNT

Number of times this job has been run.

FAILURE_COUNT

Number of times this job has failed.

RETRY_COUNT

If the job failed, it is retried; this column shows how many times it has been retried.

LAST_START_DATE

Timestamp of the last time the job started.

LAST_RUN_DURATION

Duration of the last time the job ran.

NEXT_RUN_DATE

Next time the job is scheduled to run.

SYSTEM

Indicates whether a job is a system job (TRUE or FALSE).

COMMENTS

Comments entered by you earlier.


In Oracle Database 10g Release 2, a new feature, event-based jobs (not described in this book), enable some jobs to be run based not on time but on the occurrence of certain events. To support this feature, Oracle Database 10g Release 2 adds the following new columns to the DBA_SCHEDULER_JOBS view.

JOB_SUBNAME

Name of the secondary job.

SCHEDULE_TYPE

Type of the schedule; valid values are ONCE, CALENDAR, or EVENT.

EVENT_QUEUE_OWNER

Name of the owner of the event queue.

EVENT_QUEUE_NAME

Name of the event queue.

EVENT_QUEUE_AGENT

Agent name of the event queue.

EVENT_CONDITION

Condition that will trigger the occurrence of the event.

EVENT_RULE

Rule that governs the firing of the event and subsequent execution of the job.

RAISE_EVENTS

When a job is completed, another event (or other events) may trigger a different job. Those events are recorded here.


DBA_SCHEDULER_WINDOWS

This view shows the windows defined in the database.

Column name

Description

WINDOW_NAME

Name of the window.

RESOURCE_PLAN

Name of the Resource Manager plan associated with the window.

SCHEDULE_OWNER

If the window has a named schedule, this column shows the name of the owner of the schedule.

SCHEDULE_NAME

Name of the schedule, if any.

START_DATE

Timestamp when the window will open. This is effective only when the window's calendar properties are provided inline, not via a schedule. Shown in the TIMESTAMP(6) WITH TIMEZONE datatype.

REPEAT_INTERVAL

If the window has an inline calendar string, not a named schedule, the calendar string is shown here. (See the section "Calendar Strings" in Chapter 8.)

END_DATE

When a window has an inline schedule (calendar string, not a named schedule), this specifies the timestamp when the window will close permanently. Shown in the TIMESTAMP(6) WITH TIMEZONE datatype.

DURATION

How long the window is open. Shown in the DURATION datatype.

WINDOW_PRIORITY

When two windows overlap, the one with the higher priority will be opened, and the other one will be closed. The priorities are shown as HIGH and LOW.

NEXT_START_DATE

Next timestamp the window is scheduled to open. Shown in the TIMESTAMP(6) WITH TIMEZONE datatype.

LAST_START_DATE

Timestamp of the last time the window was opened. Shown in the TIMESTAMP(6) WITH TIMEZONE datatype.

ENABLED

Specifies whether a window is enabled (TRUE/FALSE).

ACTIVE

Specifies whether a window is open now (TRUE/FALSE).

COMMENTS

Comments about the window.


Oracle Database 10g Release 2 adds several new columns to the DBA_SCHEDULER_WINDOW view. These are very useful in cases in which the window was manually opened.

SCHEDULE_TYPE

Type of the schedule; may be ONCE, CALENDAR, or EVENT.

MANUAL_OPEN_TIME

If the window was manually opened, the time is recorded here in the TIMESTAMP datatype.

MANUAL_DURATION

If the window is manually opened, the duration is recorded here in the INTERVAL datatype.


DBA_SCHEDULER_SCHEDULES

This view shows the named schedules defined in the database.

Column name

Description

OWNER

Owner of the schedule.

SCHEDULE_NAME

Name of the schedule.

START_DATE

Date and time when the schedule is supposed to start.

REPEAT_INTERVAL

Repeat interval (calendar string) that determines how often the schedule is repeated. Shown in the calendar string syntax (e.g., "FREQ=DAILY; BYMONTH=2"). See the section "Calendar Strings" in Chapter 8.

END_DATE

Date when the schedule ends.

COMMENTS

Comments on the schedule.


Oracle Database 10g Release 2 adds several new columns to the DBA_SCHEDULER_SCHEDULES view to support the event-based job triggering mechanism.

SCHEDULE_TYPE

Type of the schedule; may be ONCE, CALENDAR, or EVENT.

EVENT_QUEUE_OWNER

Name of the owner of the event queue.

EVENT_QUEUE_NAME

Name of the event queue.

EVENT_QUEUE_AGENT

Agent name of the event queue.

EVENT_CONDITION

Condition that will trigger the occurrence of the event.


DBA_SCHEDULER_PROGRAMS

This view shows the named programs in the database.

Column name

Description

OWNER

Owner of the program.

PROGRAM_NAME

Name of the program.

PROGRAM_TYPE

Type of program; may be PLSQL_BLOCK, STORED_PROCEDURE, or EXECUTABLE.

PROGRAM_ACTION

What the program does. For instance, if the program is a stored procedure, then the name of the stored procedure is shown here. If the program is an executable, then the full path is here.

NUMBER_OF_ARGUMENTS

Number of arguments of the program, if any. If no arguments, then this shows 0.

ENABLED

Whether this is enabled (TRUE/FALSE).

COMMENTS

Comments on the program.


DBA_SCHEDULER_JOB_CLASSES

This view shows the job classes in the database.

Column name

Description

JOB_CLASS_NAME

Name of the job class.

RESOURCE_CONSUMER_GROUP

Name of the resource consumer group that controls the resource allocation for this job class.

SERVICE

Service name this job class should use.

LOGGING_LEVEL

Amount of logging; possible values are:

 

OFF -no logging is performed here.

 

RUNSlogs are written only when the jobs are run.

 

FULLlogs are written during any job activity (e.g., ALTER, DROP).

LOG_HISTORY

Number of days to keep the logs.

COMMENTS

Comments on this job class.


DBA_SCHEDULER_WINDOW_GROUPS

This view shows the window groups defined in the databases.

Column name

Description

WINDOW_GROUP_NAME

Name of the window group.

ENABLED

Whether the window group is enabled; valid values are TRUE and FALSE.

NUMBER_OF_WINDOWS

Number of windows assigned to this group. For the exact window names, refer to the DBA_SCHEDULER_WINGROUP_MEMBERS view .

COMMENTS

Comments on this window group.


DBA_SCHEDULER_WINGROUP_MEMBERS

This view shows the window groups and their associated windows.

Column name

Description

WINDOW_GROUP_NAME

Name of the window group.

WINDOW_NAME

Name of the window.


DBA_SCHEDULER_JOB_LOG

See the detailed description of this view in the section "Managing Logging" in Chapter 8.

DBA_SCHEDULER_JOB_RUN_DETAILS

See the detailed description of this view in the section "Managing Logging" in Chapter 8.

DBA_SCHEDULER_RUNNING_JOBS

This view shows all jobs currently running in the database.

Column name

Description

OWNER

Owner of the job.

JOB_NAME

Name of the job.

SESSION_ID

Session ID, as shown in V$SESSION, of this job process.

SLAVE_PROCESS_ID

Process ID of the slave process.

RUNNING_INSTANCE

Instance number of the database in which this job is running. This parameter is only relevant if this is a clustered database.

RESOURCE_CONSUMER_GROUP

Name of the resource consumer group this job is associated with. This governs how much resourcesuch as CPU, parallel query server, etc.is assigned to the job.

ELAPSED_TIME

Elapsed time since this job run started. Shown in the INTERVAL datatype.

CPU_USED

Amount of CPU cycles (in time) consumed by this job. Shown in the INTERVAL datatype.


Oracle Database 10g Release 2 adds several new columns to the DBA_SCHEDULER_RUNNING_JOBS view .

JOB_SUBNAME

Sub-name of this current job

SLAVE_OS_PROCESS_ID

Operating system process ID of the slave process





Oracle PL(s)SQL For DBAs
Oracle PL(s)SQL For DBAs
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 122

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net