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!

ORA-02089: COMMIT is not allowed in a subordinate session

user5549222Jul 23 2021

I am getting "ORA-02089: COMMIT is not allowed in a subordinate session" when I used below query in Stored procedure in Oracle.
execute immediate 'truncate table xxx';
Actually, when I ran stored procedure with above query in SQL developer, it is working fine. But, when I triggered from Java code, it is giving "ORA-02089: COMMIT is not allowed in a subordinate session" issue.
Can someone help me on this?

This post has been answered by Solomon Yakobson on Jul 23 2021
Jump to Answer
Comments
Post Details
Added on Jul 23 2021
2 comments
3,400 views