Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: not allowing a job to run if it failed..
No, I mean that SNP always wraps job code with quoted code before
executing it and does this automatically. And I believe this is documented.
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "Karen Abgarian" <abvk_at_ureach.com> wrote in message news:3D95F34D.87D11D1_at_ureach.com...Received on Mon Sep 30 2002 - 08:56:38 CDT
>
> Well, what if a job is not wrapped in this code?
>
> I can legally submit a job calling a plsql procedure. This procedure is not required to
> have any specific interface, that is, it is not required to take any parameters.
>
> Did you mean that code CAN be wrapped in such a block?
>
> Regs
> AK
>
>
> "Vladimir M. Zakharychev" wrote:
>
> > Actually, job code is wrapped into a block of code like this:
> >
> > DECLARE
> > job BINARY_INTEGER := :job;
> > next_date DATE := :mydate;
> > broken BOOLEAN := FALSE;
> > BEGIN
> > <job code goes here>
> > :mydate := next_date;
> > IF broken THEN :b := 1; ELSE :b := 0; END IF;
> > END;
> >
> > I think it's pretty obvious from this code how you can stop your job from
> > running, as well as how to change its next run date/time and how to get
> > the job ID...
> >
> > Spoiler follows:
> >
> > begin
> > <actual job code>
> > exception
> > when others then
> > broken := true;
> > end;
> >
> > --
> > Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com
> > Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
> > All opinions are mine and do not necessarily go in line with those of my employer.
> >
> > "Karen Abgarian" <abvk_at_ureach.com> wrote in message news:3D940EDB.B2A1B4E8_at_ureach.com...
> > > Your job is a plsql code, you can make jobs broken by calling
> > > a DBMS_JOB procedure somewhere in the exception handler.
> > > I think the procedure name is BROKEN() but it is easy to check.
> > > You might need another call to get the job id of your job.
> > > That will effectively prevent them from running.
> > >
> > > Is that what you are looking for?
> > >
> > > I cannot tell if there are any enhancements to the jobs in 9i worth
> > > checking
> > >
> > > Regs
> > > AK
> > >
> > > NetComrade wrote:
> > >
> > > > Is there are an easy way to do this (some parameter?)
> > > >
> > > > or should I work on a workaround (like a wrapper).
> > > >
> > > > when my jobs fail, i don't want them to rerun.
> > > >
> > > > Thanx.
> > > > .......
> > > > We use Oracle 8.1.7.3 on Solaris 2.7 boxes
> > > > remove NSPAM to email
> > >
>