首页 > 代码库 > DBMS_SCHEDULER and DBMS_JOB

DBMS_SCHEDULER and DBMS_JOB

引用原文:http://foolraty.iteye.com/blog/1107803

 

For DBMS_JOB usage:
To find out more information about that failing job you can simply go over the jobnumber and select the needed information from the view dba_jobs.


SQL>select job, what from dba_jobs ;

 

For DBMS_SCHEDULER usage:
For the application user the usage of scheduled jobs is now more defined by the name of the job and not by the job identifier.
Unfortunal the error message ORA-12012 will not show you the name of the job, but will still show you the job identifier.
This job identifier is now more dictionary information and correlates to the object_id from the view dba_objects

The job identifier is stored in the table sys.scheduler$_job under column obj#.

When a relation for the job identifier to the job name is needed then the following select statement can help:

 

select obj# , object_name from sys.scheduler$_job , dba_objects
where obj# = object_id;

DBMS_SCHEDULER and DBMS_JOB