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

Home -> Community -> Usenet -> c.d.o.tools -> Re: DBMS_JOB problem

Re: DBMS_JOB problem

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: 2000/07/13
Message-ID: <aPKkhJA8feb5EwHY@ahardy.demon.co.uk>#1/1

In article <8kiaqa$ro2$1_at_nnrp1.deja.com>, Sean <dolans_at_my-deja.com> writes
>I have a stored procedure that I need to run each day. I have logged
>in as a DBA (not SYS or SYSTEM though) and did the following:
>
>ALTER SYSTEM DISABLE RESTRICTED SESSION;
>
>exec DBMS_JOB.SUBMIT(:jobno, 'pack_foo.fooBarProc;', SYSDATE
>+5/1440, 'SYSDATE + 1');
>
>When I wait for the 5 minutes to pass and do a query on the current
>time I get:
>11:50:32 as the time of day.
>
>But when I look at this, I see my current time is past when it was
>supposed to execute. Is there something I am doing wrong and it is not
>executing?
>
> SELECT job, next_date, next_sec, failures, broken
> FROM user_jobs;
>
> JOB NEXT_DATE NEXT_SEC FAILURES B
>----- ----------- -------- --------- -
> 4 12-JUL-2000 11:49:29 N
>
>
>Also if I look at current jobs running:
>SELECT sid, r.job, log_user, r.this_date, r.this_sec
> FROM dba_jobs_running r, dba_jobs j
> WHERE r.job = j.job;
>
>I get no results returned.

Don't forget to commit after you execute.

Andy

-- 
Andy Hardy. PGP ID: 0xA62A4849
===============================================================
Received on Thu Jul 13 2000 - 00:00:00 CDT

Original text of this message

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