PROBLEM:
While enabling parallel DML option, after doing some transaction, got error ORA-12841
SQL> insert into test2 select * from dba_objects; 77635 rows created. SQL> alter session enable parallel dml; ERROR: ORA-12841: Cannot alter the session parallel DML state within a transaction
SOLUTION:
If we are enabling parallel DML option, after doing some transaction, then we need to issue COMMIT or ROLLBACK, before enabling DML parallel.
oerr ora 12841
12841, 00000, “Cannot alter the session parallel DML state within a transaction”
// *Cause: Transaction in progress
// *Action: Commit or rollback transaction and then re-execute
So just issue COMMIT and try to run alter session enable parallel command.
SQL> alter session enable parallel dml; ERROR: ORA-12841: Cannot alter the session parallel DML state within a transaction SQL> commit; Commit complete. SQL> alter session enable parallel dml; Session altered.