Forum Stats

  • 3,853,608 Users
  • 2,264,246 Discussions
  • 7,905,416 Comments

Discussions

ORA-06519: active autonomous transaction detected and rolled back

634151
634151 Member Posts: 207
edited Sep 7, 2010 5:06AM in SQL & PL/SQL
Hi,

I have a trigger and calling stored procedure from the trigger. That Stored Procedure contains COMMIT statements. So i used PRAGMA AUTONOMOUS_TRANSACTION in my trigger. i created the trigger to fire after insert into the table. When i try to insert the data, i am getting the below error.

ORA-06519: active autonomous transaction detected and rolled back

Can anyone clear or correct me.

Thanks
ArulSelvam2911863

Best Answer

  • 776343
    776343 Member Posts: 10
    Answer ✓
    Before returning from a PL/SQL block, all autonomous transactions started within the block must be completed (either committed or rolled back). If not, the active autonomous transaction is implicitly rolled back and this error is raised.

    Ensure that before returning from an autonomous PL/SQL block, any active autonomous transactions are explicitly committed or rolled back.

Answers

  • 776343
    776343 Member Posts: 10
    Answer ✓
    Before returning from a PL/SQL block, all autonomous transactions started within the block must be completed (either committed or rolled back). If not, the active autonomous transaction is implicitly rolled back and this error is raised.

    Ensure that before returning from an autonomous PL/SQL block, any active autonomous transactions are explicitly committed or rolled back.
  • 776343
    776343 Member Posts: 10
    Do you have a commit inside the PL/SQL block inside the trigger
This discussion has been closed.