DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Dbms_jobs.submit

  1. #1
    Join Date
    Oct 2000
    Posts
    42

    Question Dbms_jobs.submit

    I submitted this job with the following error on 8.1.6 on Unix.

    variable jobno number;
    begin
    dbms_job.submit(:jobno,'trunc_table','NEXT_DAY(TRUNC(SYSDATE), ''MONDAY'') + 6/24');
    COMMIT;
    END;
    /

    I got the following error.
    ERROR at line 2:
    ORA-01858: a non-numeric character was found where a numeric was expected
    ORA-06512: at line 2

    How can I resolve this? Thanks

  2. #2
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    Try this...

    variable jobno number;
    begin
    dbms_job.submit(:jobno,'trunc_table;','NEXT_DAY(TRUNC(SYSDATE), ''MONDAY'') + 6/24');
    COMMIT;
    END;
    /
    Cheers!
    OraKid.

  3. #3
    Join Date
    Oct 2000
    Posts
    42
    I used the corrected code the error came back and wonder what is wrong with the jobno

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    NEXT_DATE must be supplied as a date date, not a string.

    Also, it's better practice to name the parameters as you pass them ...

    Code:
    variable jobno number;
    
    begin
       dbms_job.submit
          (
          jobno =>     :jobno,
          what =>      'trunc_table',
          next_date => NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 6/24
          );
       commit;
    END;
    /
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5
    Join Date
    Oct 2000
    Posts
    42
    Any explantion for this error
    ORA-06550: line 2, column 4:
    PLS-00306: wrong number or types of arguments in call to 'SUBMIT'. Thanks.

  6. #6
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    Parameter TWO which is ur procedure name shld hv a semi-colon. That might be an error...

    dbms_job.submit(:jobno,'trunc_table;','NEXT_DAY(TRUNC(SYSDATE), ''MONDAY'') + 6/24')
    Cheers!
    OraKid.

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