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!

DBMS_PARALLEL_EXECUTE for a procedure

muttleychessOct 17 2017 — edited Oct 18 2017

Hi

I need to create a parallel execution of a procedure, I tried the way below

DECLARE

c_task_name CONSTANT VARCHAR2(128) := 'MYJOB';

BEGIN

 BEGIN

   DBMS\_PARALLEL\_EXECUTE.DROP\_TASK(c\_task\_name);

 EXCEPTION 

    WHEN OTHERS THEN 

       NULL;  

 END;  

dbms_parallel_execute.create_task(c_task_name);

dbms_parallel_execute.create_chunks_by_sql (task_name => c_task_name

                                        , sql\_stmt  => q'$ select distinct

                                                                  audsid

                                                                , audsid

                                                             from V$SESSION WHERE ROWNUM \<=10 $'

                                        , by\_rowid  => FALSE);

dbms_parallel_execute.run_task (task_name => c_task_name

                            , sql\_stmt       => q'$ 'begin MYPROCEDURE(TRUE, 'G'); end;' $'

                            , language\_flag  => DBMS\_SQL.native

                            , parallel\_level => 5);

--dbms_parallel_execute.drop_task(c_task_name);

END;

But when I did Select in dba_parallel_execute_chunks return me

JOBERRO.jpg

How can I do It Start 9 instance of a procedure, since it does several processing and I do not know if I could put the rowid of a table

This post has been answered by Mike Kutz on Oct 17 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2017
Added on Oct 17 2017
8 comments
675 views