Skip to Main Content

Database Software

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!

Looping a table and executing jobs

user10932986Sep 28 2016 — edited Oct 5 2016

Hi All,

I have been involved with researching DBMS_Scheduler a lot these days. One of the requirement I am working on as is as follows. consider I have a table of records with data as described below

dbms_log_idColumn1Column2Process_nameSYNC_STATUS
col1datacol2dataprocess1NOT_STARTED
col1datacol2dataprocess1NOT_STARTED
col1datacol2dataprocess2NOT_STARTED
col1datacol2dataprocess2NOT_STARTED

In the above table, there are two DISTINCT processes namely process1 and process2. Probably at end of the day, we run a script that gets all the rows with sync_status = 'NOT_STARTED' and loop through them. In each loop, while the process 1 kicks a job, the other rows with the same process should not be started until the prior job is completed. But the rows with process 2 can run by kicking its corresponding job.  All rows with process1 will run a job with name 'JOB_1' and all rows with process2 will run a job with job_2. Is there a way to put the jobs in queue so the prior jobs gets completed first?

This post has been answered by GregV on Sep 29 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2016
Added on Sep 28 2016
9 comments
1,874 views