Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Run Jobs One After Another
<joero4_at_gmail.com> a écrit dans le message de news: 1173230480.583342.198420_at_j27g2000cwj.googlegroups.com...
|I know this is possible, I'm not sure how to go about it using
| Oracle's Scheduler. I simply want to create a special "queue" that I
| can submit jobs to which will run one after another. After they run,
| then then are gone. There many be no jobs at anyone time, and then at
| other times I may submit 10 jobs to the queue. Currently when I submit
| jobs they all run parrallel, this is not what I want. I guess I don't
| understand why Oracle calls it a Job Queue when all my jobs run in
| parrallel and not in a queue as the name implies.
|
| This is not say that I don't have other jobs which I would not want to
| send to this "queue". In other cases I would just want to submit the
| job and let it run right away and not wait on anything.
|
| I'm currently using the DBMS_JOB package, which I'm pretty sure won't
| let me do what I want.
|
| Any help would be greatly appreciated.
|
| Thanks,
| Joe
|
There are many ways to achieve that with dbms_job.
You can schedule a PL/SQL that execute each job.
begin
call procedure to do job1 work
call procedure to do job2 work
call procedure to do job3 work
...
end;
You can create a table in which you insert the list kof jobs you want to execute, one row per job with a sequence number and then schedule a procedure that scans this table and executes each job in the order of the sequence number.
...
Regards
Michel Cadot
Received on Tue Mar 06 2007 - 23:04:47 CST