'ORA-12842: Cursor invalidated during parallel execution error during alter table move subpartition

Had a task to compress some large tables to reduce storage costs by using Oracle's Advanced Compression. Here is the statement :

execute immediate 'ALTER TABLE ' || i_table_name || ' 
                          MOVE SUBPARTITION '|| i_sub_part_name || ' ONLINE 
                          ROW STORE COMPRESS ADVANCED 
                          UPDATE INDEXES NOLOGGING '

This statement is called by 15-20 independent jobs each with their own subpartition name. For most of the time, we get no error for majority of subpartitions, but in each run there are 1-2 cases where ORA-12842 error is thrown. There is no parallal hint, or alter session command for parallel execution, no indexes are being dropped during execution nor another session changing the same subpartition.

Any other reason why this could happen?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source