Re: Creating Job (or scheduling of SQL scripts)

From: Steve A <steve_at_micromark.com.cn>
Date: 2000/05/07
Message-ID: <1ea5gsr.8xmqb917adzj6N%steve_at_micromark.com.cn>#1/1


Hi,

actually the following is possibly safer, ( note the 'begin' & the 'end'

variable x number;
 execute dbms_job.submit(:x, -

                 'begin My_Package.My_Procedure; end;', -
                 sysdate, -
                 'sysdate + 1/48' -
                 );

 execute dbms_job.run(:x);  

<marcpark_at_my-deja.com> wrote:

> Use The DBMS_Jobs package.
>
> example
> variable x number;
> execute dbms_job.submit(:x, -
> 'My_Package.My_Procedure;', -
> sysdate, -
> 'sysdate + 1/48' -
> );
> execute dbms_job.run(:x);
>
> This should work
>
> Marc Parkinson
> Oracle Developer
>
> In article <8enafc$fu6$1_at_nntp9.atl.mindspring.net>,
> "lorax" <dpeel_at_mindspring.com> wrote:
> > Hey all,
> >
> > I'm trying to schedule a SQL script to run at a regular interval (1/2
 hour).
> > I am using the OEM (Oracle 8.1.5, OEM version 2.04) to create a job to
> > perform this task. I can create a job, but, no matter what I use for
 the
> > SQL script, the job shows completed without errors, but, the script
 does not
> > run. (I can type complete nonsense in for the script and still show
 job
> > complete without errors) The documentation suggests adding a line
 such as
> > "whenever sql error" (I don't have the exact syntax in front of me).
 I can
> > add that line, but, to no avail. If I take a copy of the SQL script
 and run
> > it under a SQL worksheet, it works.
> >
> > Is there a problem with calling stored procedures from this job?
> >
> > I have never tried to set up a job this way. Any suggestions about
 what I
> > might be doing wrong? Another way of doing?
> >
> > Thanks much,
> >
> > Doug
> >
> > dpeel_at_mindspring.com
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sun May 07 2000 - 00:00:00 CEST

Original text of this message