John Thazhath
John Thazhath

Reputation: 13

Chaining multiple procedures in oracle

I have 2 stored procedures, and I want to schedule it in such a way that the first procedure will run on once particular time, and once it completes execution, the second one should start running.

Is it possible on oracle?

Upvotes: 0

Views: 351

Answers (1)

Rusty
Rusty

Reputation: 2138

For example:

BEGIN
  DBMS_SCHEDULER.CREATE_JOB(
   job_name          =>  'job1',
   job_type          =>  'PLSQL_BLOCK',
   job_action        =>  'BEGIN 
                            proc1;
                            proc2;
                          END;',
   start_date        =>  SYSDATE, --whatever dat you want
   repeat_interval   =>  'FREQ = DAILY; INTERVAL = 1' --whatever interval you want
  );
END;
/

Read more here: http://docs.oracle.com/cd/E11882_01/server.112/e25494/appendix_a.htm#ADMIN12510

Upvotes: 3

Related Questions