Xref: alice comp.databases.oracle.server:46767
Path: alice!news-feed.fnsi.net!newsfeed.eurocyber.net!newsfeed.nyu.edu!attbtf!attbt1!ip.att.net!news.abbott.com!not-for-mail
From: "Graham Thornton" <graham.thornton@ln.ssw.abbott.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: DBMS_JOB
Date: 23 Apr 1999 15:37:35 GMT
Organization: Abbott Laboratories
Lines: 37
Message-ID: <01be8d9f$a48d6940$5e1514ac@CAPD2464.capd.abbott.com>
References: <vPVT2.39$qs2.417@news1.online.no>
X-Newsreader: Microsoft Internet News 4.70.1155

You don't need the BEGIN/END in the job to execute, just the package to
call with parameters....

SQL> exec sys.dbms_job.submit(jobno,
'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''L6'',''COMPUTE'')', SYSDATE,
'TRUNC(SYSDATE+1)');

Graham


A. Jensen <auj@storebrand.no> wrote in article
<vPVT2.39$qs2.417@news1.online.no>...
> I have submitted and commited the following job (logged on as myself,
having
> DBA-role):
>  sys.dbms_job.submit(jobno, 'BEGIN
SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''L6'',
> ''COMPUTE''); END;', SYSDATE, 'TRUNC(SYSDATE+1)');
> 
> The job is in the queue, but failes. Why?
> I have tried to run it immediately, calling dbms_job.run. Result:
> ORA-12011: Execution of 1 jobs failed.
> ORA-06512: at "SYS.DBMS_IJOB", line 255
> ORA-06512: at "SYS.DBMS_JOB", line 219
> ORA-06512: at line 2
> 
> When I run the script directly, it works OK
> BEGIN
>     SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''L6'', ''COMPUTE'');
> END;
> 
> What am I missing??
> 
> Audun
> 
> 
> 
