Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Chennai
    Posts
    7

    Question Unanswered: usage of dbms_jobs

    plz,tell me
    how to use dbms_jobs to automatically execute a procedure exactly once in a day.
    Thank u

  2. #2
    Join Date
    Oct 2003
    Location
    Republic of Srpska, Bosnia and Herzegovina
    Posts
    35
    variable jobno number;
    variable instno number;
    begin
    select instance_number into :instno from v$instance;
    dbms_job.submit(:jobno, your_procedure;', trunc(sysdate+1,'HH'), 'trunc(SYSDATE+1,''HH'')', TRUE, :instno);
    commit;
    end;
    /


    Hope this help.

  3. #3
    Join Date
    Oct 2003
    Location
    Republic of Srpska, Bosnia and Herzegovina
    Posts
    35
    Sorry, there's missing one quote identifier

    variable jobno number;
    variable instno number;
    begin
    select instance_number into :instno from v$instance;
    dbms_job.submit(:jobno, 'your_procedure;', trunc(sysdate+1,'HH'), 'trunc(SYSDATE+1,''HH'')', TRUE, :instno);
    commit;
    end;
    /

  4. #4
    Join Date
    Feb 2004
    Location
    Chennai
    Posts
    7

    Thank u

    Thank u Very much for your timely help
    S.kokila



    Originally posted by bato
    Sorry, there's missing one quote identifier

    variable jobno number;
    variable instno number;
    begin
    select instance_number into :instno from v$instance;
    dbms_job.submit(:jobno, 'your_procedure;', trunc(sysdate+1,'HH'), 'trunc(SYSDATE+1,''HH'')', TRUE, :instno);
    commit;
    end;
    /

Posting Permissions

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