Search code examples
sqldatabaseoracle-databasesqlplusoracle-pro-c

Pro*C can't force parallel DML while sqlplus can?


Whenever I issue 'alter session force parallel DML;' from Pro*C I get an error. Although, it works fine from sqlplus for the same user. Is there any reason for that?


Solution

  • This isn't directly related to Pro*C. The error ORA-12841: Cannot alter the session parallel DML state within a transaction happened in Pro*C because it had already performed DML, whereas a new SQL*Plus session did not. Moving the COMMIT or the ALTER statement should resolve the issue.

    Thanks to Hemant K Chitale and €$ħ₪ on the Oracle Forum: https://community.oracle.com/message/10002348