I am creating a job chain in the Oracle (11R2) Scheduler for a DBMS. The chain has two steps. At each step, the same program is executed, but with different arguments. I can understand how to define the chain, steps, rules, etc., but I can not understand how to set the argument values for the steps.
When I create jobs that are single program calls, I set such arguments as follows:
dbms_scheduler.set_job_argument_value(
job_name => 'MY_JOB',
argument_position => 1,
argument_value => 'foo');
My question is: what dbms_scheduler func / proc would I call to set the arguments for the job step? Using the examples below, how to set the argument for "STEP_1" to "MY_CHAIN"?
Thanks, John
DBMS_SCHEDULER.CREATE_CHAIN (
chain_name => 'MY_CHAIN',
rule_set_name => NULL,
evaluation_interval => NULL,
comments => 'Chain calls 2 steps. Same program but with different arg values.');
DBMS_SCHEDULER.DEFINE_CHAIN_STEP (
chain_name => 'MY_CHAIN',
step_name => 'STEP_1',
program_name => 'MY_PROGRAM');
DBMS_SCHEDULER.DEFINE_CHAIN_STEP (
chain_name => 'MY_CHAIN',
step_name => 'STEP_2',
program_name => 'MY_PROGRAM');
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'MY_CHAIN_JOB',
job_type => 'CHAIN',
job_action => 'MY_CHAIN',
repeat_interval => 'freq=daily;byhour=12;byminute=0;bysecond=0',
enabled => TRUE);
John source
share