select
argument_position pos,
argument_type type,
default_value def_val,
enabled
from
user_scheduler_program_args
where
program_name = 'TQ84_PROG'
order by
argument_position;
Now that we have prepared the program, we can craete a job to execute the program:
Again, the job is enabled to make the program run:
begin
dbms_scheduler.enable('
tq84_job_for_prog
');
end;
/
We find the values of the arguments in the log table:
select * from tq84_proc_log order by dt desc;
Querying other tables from the data dictionary:
select * from user_scheduler_job_run_details where job_name = 'TQ84_JOB_FOR_PROG';
select * from user_scheduler_job_log where job_name = 'TQ84_JOB_FOR_PROG';
Cleaning up:
begin
dbms_scheduler.drop_job('tq84_job_for_prog');
dbms_scheduler.drop_program('tq84_prog');
dbms_scheduler.purge_log(job_name => 'TQ84_JOB_FOR_PROG');
end;
/
drop procedure tq84_proc;
drop table tq84_proc_log;