06 February 2015

Sample code for dbms_scheduler.create_job

Sample code for dbms_scheduler.create_job

ln_job_id NUMBER;

lv_job VARCHAR2(100);

lv_job_action VARCHAR2(150) := 'BEGIN XXPACKAGE_NAME.procedure(''' ||
pv_rice_id || ''',' || pn_run_id || '); END;';
BEGIN
ln_job_id := xxaud_soa_inbound_seq.nextval;
lv_job := pv_rice_id || '_' || pn_run_id || '_' || ln_job_id;

dbms_scheduler.create_job(job_name => lv_job,
job_type => 'PLSQL_BLOCK',
job_action => lv_job_action,
number_of_arguments => 0,
enabled => TRUE,
comments => 'SOA Invoke Program');


END;