Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Fixed_date and dbms_job
You can't call a job every second via DBMS_JOB.
I believe that at best the resolution is 1 minute.
You could just open another session and run something like this:
declare
fd varchar2(50) := '01/01/2010 00:00:00';
v_sql varchar2(200);
begin
loop
v_sql := 'alter system set fixed_date = "' || fd || '"'; execute immediate v_sql; dbms_lock.sleep(1); fd := to_char(to_date(fd,'mm/dd/yyyy hh24:mi:ss') + 1/86400, 'mm/dd/yyyy hh24:mi:ss'); end loop;
Jared
Kader Ben <kaderb_at_yahoo.com>
Sent by: root_at_fatcity.com
03/13/2003 03:18 PM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: Subject: Fixed_date and dbms_job
Hi Listers,
I'm simulating the date in future with fixed_date. I wrote procedure to be called every seconde through dbms_job to increment the fixed_date.
I did that dbms_job.submit(:job_num, 'myprocedure;', sysdate, 'sysdate');
the dba_jobs table show me the right interval un next_date:
BROKEN ST_DATE LAST_SEC NEXT_DATE NEXT_SEC INTERVAL N 13-JUN-03 00:00:00 13-JUN-03 17:50:06 sysdate
And the sysdate is:
13-JUN-2003 17:50:06
But the job never execute.
Could you please give me hint how to resolve this problem?
Thanks you,
Ben
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: ListGuru_at_fatcity.com (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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author:
INET: Jared.Still_at_radisys.com
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: ListGuru_at_fatcity.com (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). Received on Fri Mar 14 2003 - 12:14:38 CST