Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parallelism in Pl/SQL similar to Thread in Java

585159Jul 20 2012 — edited Jul 20 2012
Hi All,
Is it possible to call two separate Functions ( independent from each other) in parallel (Like in Java, using Threads).
I've a requirement of calling two(or more) Functions. Currently I am doing it serially however are independent to each other.
The snippet of code is like -

For chk in Cursor1
Loop
EXECUTE IMMEDIATE 'begin : 0 :=' || g_check_master (chk.check_id).exec_prog || '(:1 ,:2, :3, :4, :5); end;'
USING OUT l_ret_val
, IN pi_report_request_id
, IN g_check_master (chk.check_id).mapped_col_in_rep_sum
, IN pi_user_cec_id
, OUT po_err_code
, OUT po_err_msg;
IF (l_ret_val = pk_snme_constants.gc_failure) THEN
---do something 1
else
---do something 2
END IF;
end loop;
---------------------------------------------------------------------------------
g_check_master contains all the function names. Content of cursor1 will decide how many functions are to be called.
Pls guide if I can do it in parallel somehow?



Regards,
Raj Pandit
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 17 2012
Added on Jul 20 2012
12 comments
2,152 views