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

Home -> Community -> Usenet -> c.d.o.server -> Re: Need help with DBMS_JOB

Re: Need help with DBMS_JOB

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/06/24
Message-ID: <33b02a34.29737279@newshost>#1/1

On Mon, 23 Jun 1997 11:02:11 +0200, Frank Tropschuh <Frank.Tropschuh_at_ubs.ch> wrote:

>I cannot submit a new job -- any suggestions?

[snip]

By default, dbms_job will parse the statement you send to it ('pg_jobs.analyze(0)' in this case.) the error you are getting is due to the parse failing when you submit it.

Dbms_job.submit simply glues "begin" to the front of the string and "end;" to the end of it. Your job is effectively:

begin
  pg_jobs.analyze(0)
end;

You are missing the ';' after (0). Its expecting one to be there.

>SQL> describe dbms_job.submit;
>PROCEDURE dbms_job.submit
> Argument Name Type In/Out Default?
> ------------------------------ ----------------------- ------ --------
> JOB BINARY_INTEGER OUT
> WHAT VARCHAR2 IN
> NEXT_DATE DATE IN DEFAULT
> INTERVAL VARCHAR2 IN DEFAULT
> NO_PARSE BOOLEAN IN DEFAULT
>
>SQL> VARIABLE ANALYZE_ID NUMBER;
>SQL> EXECUTE DBMS_JOB.submit(:ANALYZE_ID, 'PG_JOBS.ANALYZE(0)', SYSDATE,
>'SYSDATE + 1');
>begin DBMS_JOB.submit(:ANALYZE_ID, 'PG_JOBS.ANALYZE(0)', SYSDATE,
>'SYSDATE + 1'); end;
>
> *
>ERROR at line 1:
>ORA-06550: line 1, column 112:
>PLS-00103: Encountered the symbol "END" when expecting one of the
>following:
>:= . ( % ;
>; was inserted before "END" to continue.
>ORA-06512: at "SYS.DBMS_JOB", line 67
>ORA-06512: at "SYS.DBMS_JOB", line 117
>ORA-06512: at line 1
>
 

>Thanks,
>trf
>
>=================================================================
>Union Bank of Switzerland | Email: Frank.Tropschuh_at_ubs.ch
>OE EDSZ/EZIU/EPPD TRF VC419 | Tel: +41-1-236-9823
>Performance Management | Adr: Bahnhofstr. 45
>Decentral Systems | CH-8021 Zuerich
>=================================================================

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Jun 24 1997 - 00:00:00 CDT

Original text of this message

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