Skip to Main Content

Delayed execution of dbms_job.submit in Oracle 12c

810582Apr 3 2016 — edited Apr 4 2016

Dear All,

Database Version: 12.1.0.2.0

Recently the database was migrated from 9i to 12c.

We have the below problem with respect to dbms_job.

I know if we use dbms_scheduler we will overcome these problems, but unfortunately there are more than 500 forms which uses dbms_job to submit the jobs. so we can't change the working code.

DECLARE

  l_job NUMBER;

BEGIN 

DBMS_JOB.SUBMIT(l_job,'BEGIN arunjobtest; END;',sysdate);

dbms_output.put_line('l_job '||l_job);

commit;

END;

When we submit the job using above script, job runs only after 20 seconds or so.(Sometimes 20 seconds, sometimes 15 seconds).

Similarly I can see the job in dba_running_jobs only after 20 seconds. In 9i database we didn't had this problem. Whenever we submit a job it runs immediately without any delay and dba_running_jobs used to populate immediately after submission. We use dba_running_jobs to monitor jobs via Oracle forms.

Please find the below values at the time of running jobs.

select value from v$parameter where name='sessions';--480

select count(*) from v$session ;--106

job_queue_processes                  integer     1000

Also i'm wondering whether any hidden parameter to be set for running the jobs immediately.

When i use below code, i'm able to see the jobs immediately in the dba_running_jobs and jobs are running immediately. As dbms_job.run is not asynchronous, I don't want to use the below code.

DECLARE

  l_job NUMBER;

BEGIN

 

DBMS_JOB.SUBMIT(l_job,'BEGIN arunjobtest; END;',sysdate);

dbms_output.put_line('l_job '||l_job);

commit;

dbms_job.run(l_job);

commit;

END;

Kindly request you to help in this regards.

Arun

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on May 2 2016
Added on Apr 3 2016
4 comments
1,154 views