RE: Making my firts job
Hi!! I am making my firts job and I have some problems calculating the correct = time to lauch the job. I have the next procedure: CREATE OR REPLACE PROCEDURE SP_SOH_HAND AS BEGIN INSERT INTO TB_ICTRANSX select COMPANY, LOCATION,ITEM,SOH_QTY,AVERAGE_COST,= SYSDATE-1, UPDATE_TIME from iTEMLOC where TRACKING_FL=3D'Y'; COMMIT; END SP_SOH_HAND; / This procedure will feed a table every day, I want this to happen after = midnight, on the first second of the next day, every day. How can I create = a job to do that? Teresita, Just read $ORACLE_HOME/rdbms/admin/dbmsjob.sql, comments (which used to be inexact) explain fairly well how to do it. The interval you need is 'trunc(sysdate) + 1'. And don't forget to check that parameter job_processes is 0 (I even prefer 1). Regards, Stephane Faroult Oriole -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Stephane Faroult INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Making my firts job
Simple: TRUNC(SYSDATE) + 1 + 1/60/60/24 TRUNC(SYSDATE) is midnight today. +1 is midnight tomorrow. +1/60/60/24 is one second past midnight- 1/60th of a minute, which is 1/60th of an hour, which is 1/24th of a day. -Original Message-From: Teresita Castro [mailto:[EMAIL PROTECTED]Sent: Thursday, August 21, 2003 8:15 PMTo: Multiple recipients of list ORACLE-LSubject: Making my firts job Hi!! I am making my firts job and I have some problems calculating the correct time to lauch the job. I have the next procedure: CREATE OR REPLACE PROCEDURE SP_SOH_HANDASBEGININSERT INTO TB_ICTRANSX select COMPANY, LOCATION,ITEM,SOH_QTY,AVERAGE_COST, SYSDATE-1, UPDATE_TIME from iTEMLOC where TRACKING_FL='Y';COMMIT;END SP_SOH_HAND;/ This procedure will feed a table every day, I want this tohappen after midnight, on the first second of the next day, every day. How can I create a job to do that?
RE: Making my firts job
Thanks !! A friend of mine give an example of how to do a procedure that runs a job: CREATE OR REPLACE PROCEDURE lanza_job IS jobno number; instno number; begin dbms_job.submit( jobno, 'SP_SOH_HAND;', TRUNC(SYSDATE) + 1/60/60/24 ,'TRUNC(SYSDATE) + 1 + 1/60/60/24 '); commit; END lanza_job; After add the start and end date I want to ask you if this procedure is correct. I want the job to start today and continue runs every single day. Thanks a lot for your help, I am learning so much been in this list. ( I hope you understand my English) [EMAIL PROTECTED] 08/22/03 07:04AM Simple: TRUNC(SYSDATE) + 1 + 1/60/60/24 TRUNC(SYSDATE) is midnight today. +1 is midnight tomorrow. +1/60/60/24 is one second past midnight- 1/60th of a minute, which is 1/60th of an hour, which is 1/24th of a day. -Original Message-From: Teresita Castro [mailto:[EMAIL PROTECTED]Sent: Thursday, August 21, 2003 8:15 PMTo: Multiple recipients of list ORACLE-LSubject: Making my firts job Hi!! I am making my firts job and I have some problems calculating the correct time to lauch the job. I have the next procedure: CREATE OR REPLACE PROCEDURE SP_SOH_HANDASBEGININSERT INTO TB_ICTRANSX select COMPANY, LOCATION,ITEM,SOH_QTY,AVERAGE_COST, SYSDATE-1, UPDATE_TIME from iTEMLOC where TRACKING_FL='Y';COMMIT;END SP_SOH_HAND;/ This procedure will feed a table every day, I want this tohappen after midnight, on the first second of the next day, every day. How can I create a job to do that?