Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Job occasionally not running as expected.

RE: Job occasionally not running as expected.

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Fri, 14 Jul 2006 12:48:47 -0400
Message-ID: <F4C27E77F7A33E4CA98C19A9DC6722A201178E65@EXCHANGE.corp.perceptron.com>


To be really sure, I would modify "what" for this job, i.e.: BEGIN insert into job_log(message, job_date) values('start', sysdate); manhatten_com.poll_label; insert into job_log(message, job_date) values('start', sysdate); END;  

Thus, job_log table (obviously should be created) will show you actuall start/end times of each execution, and you don't have to poll dba_jobs.


From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Stuart Clowes Sent: Friday, July 14, 2006 11:13 AM
To: oracle-l_at_freelists.org
Subject: Re: Job occasionally not running as expected.

Instead of DBA_JOBS_RUNNING, I've relied on 'THIS_DATE' being not null to indicate that my job is running. This suggests that the job finished in a short time. This is supported by some logging we perform at the start and end of our procedure (not shown).  

I will add DBA_JOBS_RUNNING to my observations, to see if this agrees with THIS_DATE being null.    


 

Job is running:  

WHAT




LAST_DATE NEXT_DATE THIS_DATE DECODE(TH
-------------------- -------------------- -------------------- ---------

BEGIN manhatten_com.poll_label; END;
14-JUL-2006 12:50:31 14-JUL-2006 12:50:34 14-JUL-2006 12:50:36 EXECUTING .... job finishes (I think) as THIS_DATE is now NULL. Next_date is set to three seconds in the future.




LAST_DATE NEXT_DATE THIS_DATE DECODE(TH
-------------------- -------------------- -------------------- ---------

BEGIN manhatten_com.poll_label; END;
14-JUL-2006 12:50:36 14-JUL-2006 12:50:39   .... and finally, it appear to have executed again. (I didn't capture it executing, as it is quick).

WHAT




LAST_DATE NEXT_DATE THIS_DATE DECODE(TH
-------------------- -------------------- -------------------- ---------

BEGIN manhatten_com.poll_label; END;
14-JUL-2006 12:54:01 14-JUL-2006 12:54:04  


--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jul 14 2006 - 11:48:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US