4

Im programing a job in oracle in order to execute a store procedure, but when the time comes it just does not happend any thing for no reason.

Is there some kind of log where I can see if an error happend or something?

Im using the dbms_job package to create the job

Tnks.

Justin Cave
  • 227,342
  • 24
  • 367
  • 384
Giancarlo Solarino
  • 145
  • 1
  • 4
  • 12
  • Are you using DBMS_JOB or DBMS_SCHEDULER to execute the job? – Justin Cave Oct 28 '10 at 16:59
  • Looks like it might be from this site: http://www.orafaq.com/node/871. If so, it's DBMS_JOB functionality. – DCookie Oct 28 '10 at 17:22
  • Yes I used that sentence to create the job: declare my_job number; it creates it, but when the time comes, it doesnt execute begin dbms_job.submit(job => my_job, what => 'my_procedure(foo);' next_date => sysdate+1, interval => 'sysdate+1'); end; – Giancarlo Solarino Oct 28 '10 at 18:56

1 Answers1

9

Since you're using DBMS_JOB

  • Are you committing after making the call to DBMS_JOB.SUBMIT? Your job can't run until you've committed.
  • Have you set JOB_QUEUE_PROCESSES to a non-zero value? Are there any other DBMS_JOB jobs running in your system?
  • Can you post the results of running the following query:
SELECT last_date, 
       last_sec, 
       next_date, 
       next_sec, 
       this_date, 
       this_sec, 
       broken, 
       failures, 
       total_time
  FROM dba_jobs
 WHERE job = <<your job number>>
Justin Cave
  • 227,342
  • 24
  • 367
  • 384