Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Execute DBMS_JOBs inside a stored procedure

682415May 18 2012 — edited May 19 2012
CREATE OR REPLACE PROCEDURE repl.RunAllJobs
IS

BEGIN
DECLARE
a job%TYPE;

BEGIN
DBMS_JOB.submit (a, 'repl.ExecuteSP1);');
DBMS_JOB.submit (a, ' repl.ExecuteSP2;');
DBMS_JOB.submit (a, 'repl.ExecuteSP3);');
DBMS_JOB.submit (a, ' repl.ExecuteSP4;');

END;
END RunAllJobs;
/

The problem is that the SP returns ( meaning shows completed ) after kicking off the jobs.

I want the SP to return ( showing completed ) only after all the jobs are completed successfully, else return error .
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2012
Added on May 18 2012
4 comments
478 views