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

Thread: Dbms_job

  1. #1
    Join Date
    Feb 2002
    Posts
    48

    Dbms_job

    I have set up a DMBS_JOB with the syntax below:

    VARIABLE jobno number;
    BEGIN
    dbms_job.submit(:jobno,
    'reset_nbr;',
    SYSDATE, 'null');
    END;
    /

    When I check data dictionary on DBA_JOBS, the job is on the queue. But somehow it is not executing. Am I doing anything wrong?
    Also, is it possible to set the job to run at the specific time of the day?

    Thank you in advance....

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    COMMIT;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Feb 2002
    Posts
    48
    When I did DBMS_JOB.RUN, it was executed immediately and was able to test it.

    Could you please tell me how I could set the job to run on the 1st of each month at 2am?

    Thanks!

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253

    Re: Dbms_job

    This should work ...
    Code:
    VARIABLE jobno number;
    
    Begin
      DBMS_Job.Submit
         (
         job => :jobno,
         what => 'reset_nbr;',
         next => Trunc(SysDate,'MM')+(2/24),
         interval => 'Trunc(SysDate,'MM')+(2/24)'
         );
    End;
    /
    Commit;
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  5. #5
    Join Date
    Feb 2002
    Posts
    48
    Thank you very much for the information!

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