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: Problems executing a job

Re: Problems executing a job

From: Dale Underwood <dale_at_fox.nstn.ca>
Date: Fri, 15 Dec 2000 22:10:37 -0500
Message-Id: <10711.124766@fatcity.com>


We have lots of fun with oracle jobs too (NOT!!). A few things to try....

Occassionally a job will show as BROKEN = 'N' but the next_date will show in the year 4000. So it will never get executed. Usually running the job manually (eg exec dbms_job.run(jobno); ) will fix the date problem.

Also make sure that you have job_queue_processes set in the init.ora so the instance starts up at least one "snp_..." background process to run the job.

I have seen the snp process get stuck running one job and so it never is free to execute other jobs. If you suspect this, check if other jobs are running (dba_jobs_running) and see if they are stuck.

Good Luck.
Babette
babette_at_pythian.com

> Hi there!
>
> I am having a problem with DBMS_JOB. I submitted a job under our
application
> user (VIVOUSER) to be executed every morning at 5 am:
>
> Variable jobno number;
> Begin
> Dbms_job.submit (:jobno, 'WH_PKG.RECALCDAY(SYSDATE-1,38217,1);', SYSDATE,
> 'trunc(SYSDATE+1)+5/24');
> Commit;
> End;
>
> SQLWKS> select * from user_jobs
> 2>
> JOB LOG_USER PRIV_USER SCHEMA_USER FAILURES WHAT
> INSTANCE
> ---------- ------------- ------------- ------------- -------- ------------

--

> ----------------------- ---------
> 61 VIVOUSER VIVOUSER VIVOUSER 0
> WH_PKG.RECALCDAY(SYSDATE-1,38217,1); 0
> 62 VIVOUSER VIVOUSER VIVOUSER 0
> WH_PKG.RECALCDAY(SYSDATE-1,38217,2); 0
> 2 rows selected.
>
> I set all the necessary init.ora parameters. And the user_jobs view tells
me
> that the job gets executed. The failures column shows '0' errors.
>
> As I understand, every user can create and execute jobs, right?
>
> Anyway, it seems that the job does not run, because the data in a table
does
> not get updated. So every moning, I have to log into SQL Plus as VIVOUSER
> and 'execute WH_PKG.RECALCDAY(SYSDATE-1,38217,1);' manually. It works fine
> then. (I have a second job that does the exact same thing but for other
rows
> in the table; hende the second job with the parameter '2').
>
>
> Any idea what the problem could be?
>
> This is 8.1.6 on Win2k.
>
> Thanks,
> Helmut
>
>
> --------
> Think you know someone who can answer the above question? Forward it to
them!
> to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com
> to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
Received on Fri Dec 15 2000 - 21:10:37 CST

Original text of this message

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