Please help: ORA-06512 to use DBMS_JOB
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Please help: ORA-06512 to use DBMS_JOB

  1. #1
    Join Date
    Apr 2002
    Posts
    73
    SQL> variable jobno number
    SQL> exec dbms_job.submit(JOB => :jobno, -
    > WHAT => 'ANALYZE_SCHEMAS',-
    > NEXT_DATE => trunc(SYSDATE)+1,-
    > INTERVAL => 'SYSDATE+1');
    BEGIN dbms_job.submit(JOB => :jobno, WHAT => 'ANALYZE_SCHEMAS',

    *
    ERROR at line 1:
    ORA-06550: line 1, column 109:
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    := . ( @ % ;
    The symbol ";" was substituted for "END" to continue.
    ORA-06512: at "SYS.DBMS_JOB", line 79
    ORA-06512: at "SYS.DBMS_JOB", line 131
    ORA-06512: at line 1

  2. #2
    Join Date
    Dec 2001
    Location
    SAN FRANCISCO, CA
    Posts
    306
    To be more clear cut and paste the entire code of ur pl/sql blcok.

  3. #3
    Join Date
    Apr 2002
    Posts
    73
    CREATE OR REPLACE PROCEDURE ANALYZE_SCHEMAS
    AS
    type array is table of varchar2(30);
    l_users array := array('B2E52_US1', 'B2E52_US2', 'B2E52_US3');
    l_junk varchar2(30);
    errmsg varchar2(255);

    BEGIN

    FOR i in 1 .. l_users.count
    LOOP
    BEGIN

    DBMS_UTILITY.ANALYZE_SCHEMA(l_users(i),'COMPUTE');

    END;
    END LOOP;

    END;
    /

    variable jobno number
    exec dbms_job.submit(JOB => :jobno, -
    WHAT => 'ANALYZE_SCHEMAS',-
    NEXT_DATE => 'trunc(SYSDATE)+1',-
    INTERVAL => 'SYSDATE+1');

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width