To schedule a job to run every night at midnight, do the following:
set serveroutput on
declare
job number; l
begin
dbms_job.submit( l
job, -- number of job that the system will assign to the new job
'name_of_procedure_to_run;', -- need the semi-colon within the string
trunc(sysdate)+1, -- date that the procedure is to run, midnight tonight
'trunc(sysdate)+1+1' -- interval between jobs, midnight tommorrow night
;(
dbms_output.put_line(to_char(job)); l
end; l
/
Aryeh Keefe
________________________________
מאת: Naveen [mailto:naveen.[Email address protected]
נשלח: א 30/05/2004 14:07
אל: Aryeh Keefe
נושא: RE: Scheduling a procedure to run at Mid Night ( DBMS Package) --Oracle 9i rel 2
can i schedue a procedure.. plse let me know the syntax.... i want to create
and drop a sequence at mid night.......
-----Original Message-----
From: Aryeh Keefe [mailto:[Email address protected]
Sent: Sunday, May 30, 2004 5:04 PM
To: NAVEEN.[Email address protected]
Subject: RE: Scheduling a procedure to run at Mid Night ( DBMS Package)
--Oracle 9i rel 2
**A LazyDBA.com subscriber has responded to your lazydba.com post**
**LazyDBA.com mail shield has forwarded you this email,
**and removed any attachments, and kept your email address secret
**from this person, and any viruses/trojans.
**If you reply to this email, the person will see your email address as
normal
**Anything below this line is the original email text
Use the dbms_job package
Aryeh Keefe
-----Original Message-----
From: Naveen
[mailto:oracledba-ezmlmshield-x3737342.[Email address protected]
Sent: Sunday, May 30, 2004 12:22 PM
To: LazyDBA.com Discussion
Subject: Scheduling a procedure to run at Mid Night ( DBMS Package) --
Oracle 9i rel 2
I want to run a procedure everyday mid night... How can I schedule it to
run
at mid night using Oracle DBMS packages...
DB:Oracle 9i rel 2.
Thanks & Regards,
Naveen Kumar
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
****************************************************************************
**********************
This e-mail message has been sent by Team Computer and Systems Ltd. and is
for the
use of the intended recipients only. This document may contain confidential,
commercial and privileged information or data that constitute proprietary
information of
TEAM Computers & Systems. Any review or distribution by others is strictly
prohibited.
If you are not the intended recipient you are hereby notified that any use
of this
information or data by any other person is absolutely prohibited and your
repuested to
delete the e-mail and notify the sender immediately. Thank You.
****************************************************************************
**********************
** eSafe scanned this email for viruses, vandals and malicious content **
**************************************************************************************************
This e-mail message has been sent by Team Computer and Systems Ltd. and is for the
use of the intended recipients only. This document may contain confidential,
commercial and privileged information or data that constitute proprietary information of
TEAM Computers & Systems. Any review or distribution by others is strictly prohibited.
If you are not the intended recipient you are hereby notified that any use of this
information or data by any other person is absolutely prohibited and your repuested to
delete the e-mail and notify the sender immediately. Thank You.
**************************************************************************************************
** eSafe scanned this email for viruses, vandals and malicious content **
Oracle LazyDBA home page