STORED PROCEDURE-SCHEDULE

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
  

Poston Thu, 22 Mar 2007 5:24 pm

Dear friends, I have a STORED PROCEDURE that takes her to be executed every day in the morning (04 in the morning). Does anyone have a script for doing this?
Hugs, Cesar
CESAR_CARVALHO
Location: MARINGA-PR

Cesar Luis de Carvalho
Maringá-PR

Poston Thu, 22 Mar 2007 5:36 pm

here goes:
Code: Select all
begin
  sys.dbms_job.submit(job => :job,
                      what => 'begin PRC_sua_rotina; end;',
                      next_date => to_date('22-03-2007 20:41:52', 'dd-mm-yyyy hh24:mi:ss'),
                      interval => 'TRUNC(sysdate+1) + 1/24*4');
  commit;
end;
/
only changes the NEXT DATE to the date that you want to run the first time. Then, this date will be updated automatically to date that goes that \"interval\", i.e. the next day + 4:0.
:-o

To consult, do a SELECT * FROM ALL_JOBS; :-D:-
dr_gori
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?
http://glufke.net/oracle/search.php?search_id=unanswered

Poston Fri, 23 Mar 2007 8:13 am

Dear Dr_gori big hug, it solved my problem.
Thank you.
CESAR_CARVALHO
Location: MARINGA-PR

Cesar Luis de Carvalho
Maringá-PR


  • See also
    Replies
    Views
    Last Post