Question

Very new to this topic - using 11g.

When I create a materialized view, a matching job (not a scheduler job) is created. But it's my understanding that dbms_job is being replaced by dbms_scheduler.

Am I doing something wrong or am I totally misunderstanding what's going on?

Was it helpful?

Solution

You are not doing anything wrong and your understanding is correct. Materialized views that are created or altered to have a refresh schedule use DBMS_JOB rather than DBMS_SCHEDULER. This would be unexpected given the following wording from the 11.2 Administrators Guide (emphasis mine):

DBMS_JOB is a PL/SQL package that you use to schedule jobs. It is replaced by Oracle Scheduler, which is more powerful and flexible. Although Oracle recommends that you switch from DBMS_JOB to Oracle Scheduler, DBMS_JOB is still supported for backward compatibility.

I agree with Jack Douglas and the comments he linked to. DBMS_JOB is unlikely to go away anytime soon.

OTHER TIPS

dbms_scheduler, while being much more powerful/flexible than dbms_job, is not a simple/complete replacement for it. dbms_job is still widely used as you have discovered and is unlikely to go away

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top