Re: Job scheduling in 11g

  • From: Ravi Madabhushanam <ravi.madabhushanam@xxxxxxxxx>
  • To: Robert Freeman <robertgfreeman@xxxxxxxxx>
  • Date: Thu, 17 Jun 2010 21:34:39 +0530

Thank you very much Robert.

It think I'll use DBMS_SCHEDULER for this. Jobs that I want to run are
PL/SQL blocks with no OS level stuff in them. I think creating PL/SQL
procedures for these steps and executing them via DBMS_SCHEDULER will be the
best approach available.

This also gives me an opportunity to learn this feature. I've been putting
it off for quite some time :-)

Thanks,
~Ravi.M

On Thu, Jun 17, 2010 at 6:09 PM, Robert Freeman <robertgfreeman@xxxxxxxxx>wrote:

> Dr. Tim Hall has a good page on using the job scheduler (not schedular as I
> mistyped earlier!!)
>
> See: http://www.oracle-base.com/articles/10g/Scheduler10g.php
>
>
> Robert G. Freeman
> Master Principal Consultant, Oracle Corporation, Oracle ACE
> Author of various books on RMAN, New Features and this shorter signature
> line.
> Blog: http://robertgfreeman.blogspot.com
>
>
> ------------------------------
> *From:* Ravi Madabhushanam <ravi.madabhushanam@xxxxxxxxx>
> *To:* Yechiel Adar <adar666@xxxxxxxxxxxx>; Martin Bach <
> development@xxxxxxxxxxxxxxxxx>
> *Cc:* "oracle-l@xxxxxxxxxxxxx" <Oracle-L@xxxxxxxxxxxxx>
> *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.
>
> Regards,
> ~Ravi.M
>
> On Thu, Jun 17, 2010 at 1:08 PM, Yechiel Adar <adar666@xxxxxxxxxxxx>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
>> :check
>> 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
>> :recheck
>> sleep 30
>> goto :check
>> :error
>> echo batch finished with error.
>> exit 50
>> :finish
>> exit 0
>>
>>
>>
>> Adar Yechiel
>> Rechovot, Israel
>>
>>
>>
>>
>> Ravi Madabhushanam wrote:
>>
>>> Hello All,
>>>
>>> We have a requirement to schedule multiple jobs in Oracle 11g (11.1.0.7)
>>> 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.
>>>
>>> Regards,
>>> Ravi.M
>>>
>>>
>>>
>

Other related posts: