Re: Script to run the broken job

From: ddf <oratune_at_msn.com>
Date: Fri, 12 Jun 2009 07:16:02 -0700 (PDT)
Message-ID: <645343ee-8748-465a-a5aa-1b8331c27a54_at_z8g2000prd.googlegroups.com>



On Jun 11, 8:12 pm, Somaskandan <somas2..._at_gmail.com> wrote:
> On Jun 11, 11:21 am, Nag <naga.cha..._at_gmail.com> wrote:
>
> > Anyone has a readily availiable  script to capture the broken job id
> > and run it again.
>
> > Thanks,
> > Naga
>
> Hope this is what you expect...
>
> BEGIN
>    FOR i IN (SELECT job FROM user_jobs WHERE broken='Y')
>    LOOP
>         dbms_job.broken(i.job,false);
>         dbms_job.run(i.job,true); -- to forcibly run, specify true
> else false. default is false.
>    END LOOP;
> END;
>
> Thanks,
> Soma

Most likely the job is broken for a reason (usually because some object is missing or invalid) so immediately running it again, without checking why it became broken, may be a useless task to undertake.

David Fitzjarrell Received on Fri Jun 12 2009 - 09:16:02 CDT

Original text of this message