Parallel PL/SQL with DBMS_PARALLEL_EXECUTE


My blog has moved, the article you are looking for can be found here:
https://seanstuber.com/2013/10/17/parallel-plsql-with-dbms_parallel_execute/

Advertisements

About Sean D. Stuber
Developer, DBA, Oracle ACE

2 Responses to Parallel PL/SQL with DBMS_PARALLEL_EXECUTE

  1. Hi Sean,

    Your blog about the topic (Parallel PL/SQL with DBMS_PARALLEL_EXECUTE) was what i was looking for to implement. It was very helpful example

    Calling a procedure multiple times with different parameters (Parallel processing)

    Topic : Parallel PL/SQL with DBMS_PARALLEL_EXECUTE

    URL : https://seanstuber.wordpress.com/2013/10/17/parallel-plsql-with-dbms_parallel_execute/

    I am just using the same code what was written by you and compiled it.

    I am able to compile the code but when executing the procedure i am getting the below error :

    Command user for execution : EXEC parallel_exec_test_proc

    Error Message :

    [Error] Execution (2: 1): ORA-29497: duplicate task name
    ORA-06512: at “SYS.DBMS_PARALLEL_EXECUTE_INTERNAL”, line 170
    ORA-00001: unique constraint (SYS.PK_DBMS_PARALLEL_EXECUTE_1) violated
    ORA-06512: at “SYS.DBMS_PARALLEL_EXECUTE”, line 86
    ORA-06512: at “NDS.PARALLEL_EXEC_TEST_PROC”, line 8
    ORA-06512: at line 1

    Your help regarding this issue will be much appreciated..

    Like

    • The test procedures create and execute the tasks but do not remove them.
      I did that intentionally for the tests to leave objects around to investigate after execution.

      You can see yours with

      SELECT task_name, status FROM user_parallel_execute_tasks;

      Then to clean them up, assuming you ran both tests cases…

      BEGIN
      DBMS_PARALLEL_EXECUTE.drop_task(‘parallel_test1’);
      DBMS_PARALLEL_EXECUTE.drop_task(‘parallel_test2’);
      END;

      It would be ok to add these to the test procedures yourself so they do their own cleanup, but then you lose the status tracking.

      Alternately, change the code to create a unique task name each time and then you can compare multiple runs over time and do clean up later when you no longer need them.

      Like

Questions and Comments always welcome

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: