From: ras117@my-deja.com
Newsgroups: comp.databases.oracle.misc
Subject: Re: How Do I Schedule An SQL Query To Take Place On A Daily Basis?
Date: Tue, 12 Dec 2000 14:11:37 GMT
Organization: Deja.com - Before you buy.
Lines: 53
Message-ID: <915bml$cdn$1@nnrp1.deja.com>
References: <XORY5.10492$Wd.996085@typhoon2.ba-dsg.net> <910ti4$2j6l5$1@ID-62141.news.dfncis.de>
NNTP-Posting-Host: 194.164.207.254
X-Article-Creation-Date: Tue Dec 12 14:11:37 2000 GMT
X-Http-User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22smp i686; en-US; m18) Gecko/20001107 Netscape6/6.0
X-Http-Proxy: 1.1 x54.deja.com:80 (Squid/1.1.22) for client 194.164.207.254
X-MyDeja-Info: XMYDJUIDras117


In article <910ti4$2j6l5$1@ID-62141.news.dfncis.de>,
  "Sybrand Bakker" <postbus@sybrandb.demon.nl> wrote:
> Two solutions
> 1 write a pl/sql procedure which either uses dbms_output or utl_file.
 Submit
> this procedure with the dbms_job package. Your init.ora parameter
> job_queue_processes has to be set for this.
> 2 write a sqlplus script and use the at-command (NT) or crontab (Unix) to
> submit the script.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> "Matt Connors" <connorsm@bellatlantic.net> wrote in message
> news:XORY5.10492$Wd.996085@typhoon2.ba-dsg.net...
> > Is there an easy way to have an SQL query executed on a daily basis, say
> > 1:00 am each night?
> >
> > Thanks,
> >
> > --
> > Matt Connors
> > 703-892-0790
> > Matt@ConnorsOfCourse.com
> >
> >
>
>

Hey I'm setting off a procedure to run midnight with the following.
However I am not sure if this would work.

VARIABLE V_JOBNUM NUMBER;
BEGIN
DBMS_JOB.SUBMIT(:V_JOBNUM,'UPDATEMAILDROP;',ROUND(SYSDATE),'SYSDATE+1');
COMMIT;
END;

Where the procedure name is updatemaildrop, the first time the procedure
should start is at midnight today. I am not too sure if it will do it
again at midnight the next day 'though.

Comment  welcome.


Thanks

Raihan Sarker


Sent via Deja.com http://www.deja.com/
Before you buy.

