Re: Job scheduling in 11g

From: Robert Freeman <>
Date: Thu, 17 Jun 2010 05:36:42 -0700 (PDT)
Message-ID: <>

You probably want to look at DBMS_SCHEDULER rather than DBMS_JOBS. DBMS_SCHEDULAR is the new job scheduler and It allows the daisy chaining that you are looking for and direct execution of external jobs from within the database. OEM has an interface into DBMS_SCHEDULER. One word of warning. The new job scheduler has a lot more functionality, and is thus a bit more complex.



 Robert G. Freeman
Master Principal Consultant, Oracle Corporation, Oracle ACE Author of various books on RMAN, New Features and this shorter signature line. Blog:

From: Ravi Madabhushanam <> To: Yechiel Adar <>; Martin Bach <> Cc: "" <> Sent: Thu, June 17, 2010 3:59:58 AM
Subject: Re: Job scheduling in 11g

Thank you Martin and Adar.

Both these options are promising.
I'm more inclined towards database job chains as it will help me explore other features of database. Ofcourse batch job is always easy. Let me try these options and get back to you.

Thanks a lot for your inputs.


On Thu, Jun 17, 2010 at 1:08 PM, Yechiel Adar <> wrote:

You can do that easily in windows. Just from the top of my head.
>>Each job creates file jobx.ok or jobx.error.
>>file: schedule jobs.cmd
>>del *.ok
>>del *.error
>>call job1.cmd
>>if exist job1.error goto :error
>>attach job2.cmd
>>attach job3.cmd
>>attach job4.cmd
>>attach job5.cmd
>>if exist *.error goto :error
>>if not exist job2.ok go to :recheck
>>if not exist job3.ok go to :recheck
>>if not exist job4.ok go to :recheck
>>if not exist job5.ok go to :recheck
>>call job6.cmd
>>if exist job6.error goto :error
>>call job7.cmd
>>if exist job7.error goto :error
>>goto :finish
>>sleep 30
>>goto :check
>>echo batch finished with error.
>>exit 50
>>exit 0
>>Adar Yechiel
>>Rechovot, Israel
>>Ravi Madabhushanam wrote:
>>>Hello All,
>>>>We have a requirement to schedule multiple jobs in Oracle 11g ( on windows. We have multiple jobs which needs to be executed in a specific order serial and parallel.
>>>>Below is the sequence of our jobs.
>>>>Job 1 -- serial
>>>>Job 2 -- parallel
>>>>Job 3 -- parallel
>>>>Job 4 -- parallel
>>>>Job 5 -- parallel
>>>>Job 6 -- serial
>>>>Job 7 -- serial
>>>>After completion of Job1 we need start job 2,3,4 and 5 in parallel. After completion of all jobs 1-5, Job 6 should start. And job 7 should run only after execution of Job6.
>>>>On linux I would have opted for shell scripting for this. But we are on windows now and I'm not really confident about it. I thought DBMS_Job can be used for this.
>>>>Could you guys please share your opinion on how best I can approach this requirement. Is DBMS_JOB the right choice ? do we have any better way to do this.
>>>>Thanks a lot.

Received on Thu Jun 17 2010 - 07:36:42 CDT

Original text of this message