Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DBMS_JOB vs DBMS_SCHEDULER

What is the difference between DBMS_JOB and DBMS_SCHEDULER ?

like image 821
kupa Avatar asked Nov 11 '10 07:11

kupa


People also ask

Is DBMS_JOB deprecated?

The DBMS_JOB package has been deprecated since 12cR2. Oracle 19c takes the demise of the DBMS_JOB package a step further by converting any DBMS_JOB jobs to DBMS_SCHEDULER jobs.

What is the use of DBMS_SCHEDULER in Oracle?

The DBMS_SCHEDULER package provides a collection of scheduling functions and procedures that are callable from any PL/SQL program.

What is DBMS_JOB submit?

Answer: As a review, the dbms_job.submit procedure accepts three parameters, the name of the job to submit, the start time for the job, and the interval to execute the job: dbms_job.submit( what=>'statspack_alert.sql;', next_date=>sysdate+1/24, -- start next hour.

What is DBMS_JOB broken?

If a job has been marked as broken with DBMS_JOB. BROKEN, or has been marked as broken by Oracle, Oracle will not attempt to execute the job until the broken status has been removed or the the job has been forced to execute.


1 Answers

From other forums:

Although dbms_job still exists in 10g and 11g, Oracle recommends the use of dbms_scheduler in releases 10g and up. No new features are being added to dbms_job and you will likely quickly run into its limitations.

dbms_scheduler is more robust and fully-featured than dbms_job and includes the following features that dbms_job does not have :

  • logging of job runs (job history)
  • simple but powerful scheduling syntax (similar to but more powerful than cron syntax)
  • running of jobs outside of the database on the operating system
  • resource management between different classes of jobs
  • use of job arguments including passing of objects into stored procedures
  • privilege-based security model for jobs
  • naming of jobs and comments in jobs
  • stored, reusable schedules

Features in releases after 10g Release 1 include :

  • dependencies between job units (10gR2 and up)
  • scheduling based on financial calendars and fiscal quarters (10gR2 and up)
  • event based jobs which run when an event is received (10gR2 and up)
  • running of jobs on remote machines (11gR1 and up)
  • e-mail notifications on job events of interest (10gR2 and up)
  • starting a job based on arrival of a file (10gR2 and up)
like image 89
MKU Avatar answered Oct 28 '22 04:10

MKU