Oracle 视图 DBA_JOBS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_JOBS是一个系统定义的视图,它列举了系统中的所有作业列表,其中包括定义的和当前执行的作业,以及那些开启了自动执行的作业。用户可以用它来查询作业的详细信息,例如作业的状态、作业的开始和结束时间、运行时间以及作业正在运行的计算机。

要使用DBA_JOBS,可以使用选择语句SELECT * FROM dba_jobs 以显示所有系统中定义的作业;使用条件SELECT * FROM dba_jobs WHERE status=’RUNNING’ 则可以显示正在运行的作业;用户也可以根据需要来编写查询,以查找特定作业的详细信息。

官方英文解释

DBA_JOBS describes all jobs in the database.

Related View

USER_JOBS describes the jobs owned by the current user.

Column Datatype NULL Description

JOB

NUMBER

NOT NULL

Identifier of job. Neither import/export nor repeated executions change this value.

LOG_USER

VARCHAR2(128)

NOT NULL

Login user when the job was submitted

PRIV_USER

VARCHAR2(128)

NOT NULL

User whose default privileges apply to this job

SCHEMA_USER

VARCHAR2(128)

NOT NULL

Default schema used to parse the job

For example, if the SCHEMA_USER is SCOTT and you submit the procedure HIRE_EMP as a job, the Oracle Database looks for SCOTT.HIRE_EMP

LAST_DATE

DATE

Date on which this job last successfully executed

LAST_SEC

VARCHAR2(8)

Same as LAST_DATE. This is when the last successful execution started.

THIS_DATE

DATE

Date that this job started executing (usually null if not executing)

THIS_SEC

VARCHAR2(8)

Same as THIS_DATE. This is when the last successful execution started.

NEXT_DATE

DATE

NOT NULL

Date that this job will next be executed

NEXT_SEC

VARCHAR2(8)

Same as NEXT_DATE. The job becomes due for execution at this time.

TOTAL_TIME

NUMBER

Total wall clock time spent by the system on this job (in seconds) when it last executed

BROKEN

VARCHAR2(1)

Y: no attempt is made to run this job

N: an attempt is made to run this job

INTERVAL

VARCHAR2(200)

NOT NULL

A date function, evaluated at the start of execution, becomes next NEXT_DATE

FAILURES

NUMBER

Number of times the job has started and failed since its last success

WHAT

VARCHAR2(4000)

Body of the anonymous PL/SQL block that the job executes

NLS_ENV

VARCHAR2(4000)

Session parameters describing the NLS environment of the job

MISC_ENV

RAW(32)

Other session parameters of the session that created the job. The job is run using these parameters.

INSTANCE

NUMBER

ID of the instance that can execute or is executing the job. The default is 0.

See Also:

“USER_JOBS”


数据运维技术 » Oracle 视图 DBA_JOBS 官方解释,作用,如何使用详细说明