UserM
UserM

Reputation: 11

dbms_parallel_execute.task_status gives invalid status 4

For what reason dbms_parallel_execute.task_status returns 4. Below is my issue. This job was ruining multiple times without records to process. and finally it started going out of the loop at point it calls dbms_parallel_execute.resume_task(l_task) I have the values that has for L_try and L_status during the run-time Have used dbms_parallel_execute.create_chunks_by_rowid L_status = 4 and L_try = 0 and it goes out of the loop at below bold point.. Please help .. What need to be done to get the process running smooth again

       L_try := 0;
        L_status := DBMS_PARALLEL_EXECUTE.TASK_STATUS(l_task);
        dbms_output.put_line(L_status);

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

          dbms_output.put_line(L_try);
          L_try := l_try + 1;

          **DBMS_PARALLEL_EXECUTE.RESUME_TASK(l_task);**
          L_status := DBMS_PARALLEL_EXECUTE.TASK_STATUS(l_task);

        END LOOP;

Upvotes: 1

Views: 1418

Answers (1)

Maxim Borunov
Maxim Borunov

Reputation: 911

Status 4 stands for NO_CHUNKS:

  NO_CHUNKS             CONSTANT NUMBER := 4;

So most probably you just don't generate any chunks for processing. There is no data to be processed.

You should avoid running task (DBMS_PARALLEL_EXECUTE.RUN_TASK) if there's nothing to do.

Upvotes: 1

Related Questions