For at undgå at sende flere Oracle-job, kan du prøve at bruge William Robertson Parallel PL/ SQL launcher .
Ideen er at oprette en funktion ved hjælp af PARALLEL_ENABLE
og PIPELINED
funktioner:
function pq_submit
( p_job_list varchar2_tt
, p_pq_refcur rc_pq_driver )
return varchar2_tt
parallel_enable(partition p_pq_refcur by any)
pipelined
is
...
loop
execute_command(your_proc);
end loop;
Funktion execute_command
bruger autonomous_transaction
.
Det ser sådan ud:
procedure execute_command
( p_what log_times.what%type )
is
pragma autonomous_transaction;
begin
execute immediate p_what;
commit;
end execute_command;