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!

Error in DBMS_PARALLEL_EXECUTE

Ramesh_85Jul 25 2018 — edited Jul 26 2018

Hi All,

I am trying to execute my procedure through the DBMS_PARALLEL_EXECUTE package. when I execute the below code, all are got PROCESSED_WITH_ERROR with following errors.

DECLARE

l_try NUMBER;

l_status NUMBER;

BEGIN

-- Create the TASK

DBMS_PARALLEL_EXECUTE.CREATE_TASK ('AGREEMENT_LOAN');

-- Chunk the table by ROWID

DBMS_PARALLEL_EXECUTE.CREATE_CHUNKS_BY_ROWID(task_name => 'AGREEMENT_LOAN', table_owner => USER, table_name => 'C_TMP_TRN_AGREEMENT', by_row => false, chunk_size => 10000);

-- Execute the DML in parallel

DBMS_PARALLEL_EXECUTE.RUN_TASK(task_name => 'AGREEMENT_LOAN', sql_stmt => 'BEGIN EOD_TMPUPLOADAGREEMENT_LOANS(:START_ID, :END_ID); END;', language_flag => DBMS_SQL.NATIVE, parallel_level => 10);

-- If there is an error, RESUME it for at most 2 times.

L_try := 0;

L_status := DBMS_PARALLEL_EXECUTE.TASK_STATUS('AGREEMENT_LOAN');

WHILE(l_try < 2 and L_status != DBMS_PARALLEL_EXECUTE.FINISHED)

LOOP

L\_try := l\_try + 1;

DBMS\_PARALLEL\_EXECUTE.RESUME\_TASK('AGREEMENT\_LOAN');

L\_status := DBMS\_PARALLEL\_EXECUTE.TASK\_STATUS('AGREEMENT\_LOAN');

END LOOP;

-- Done with processing; drop the task

DBMS_PARALLEL_EXECUTE.DROP_CHUNKS('AGREEMENT_LOAN');

DBMS_PARALLEL_EXECUTE.DROP_TASK('AGREEMENT_LOAN');

END;

Error messages:

pastedImage_0.png

Please guide me how to resolve this issue.

This post has been answered by Ramesh_85 on Jul 25 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2018
Added on Jul 25 2018
4 comments
1,541 views