Reputation: 1145
I have an procedure inside a package which i have to run everyday manualy. how to make it done by oracle automaticaly in oracle 10g.
There are 3 inputs(2 nos,1 varchar) and one output(varchar) of the executing procedure
Inputs values will remain same for me,but in case i have to change it wat do I do. can anybody explain me with easy examples.
Thanks Avi
Upvotes: 1
Views: 194
Reputation: 11
You can use DBMS_JOB.iSubmit function like the following.
BEGIN
DBMS_JOB.isubmit ( job => 61,
what => 'YOUR_PROCEDURE;',
next_date => to_date('03.10.2014 00:30:00','dd.MM.yyyy HH24:Mi:ss'), -- start now INTERVAL => 'sysdate + 1' -- Run every day );
COMMIT;
END;
JOB: You can use an ID which has not been used in user_jobs. You can check them with the following query.
select * from user_jobs;
What: The name of your procedure with ";" at the end. Next_date: The time you want your job to be run. Interval: The period of your job. Should be 'sysdate+1' for everyday.
You can remove it with the script below:
begin DBMS_JOB.REMOVE(JOB => 61); end;
Upvotes: 1