How can I exclude a statement in a transaction rollback?

Insert into table a
call proc_1()

How can I rollback all the commands except/prevent proc_1() from rolling back?

  • Isn't it as simple as movimg the proc call to the end of the statement?
    – M.Ali
    Dec 11, 2016 at 16:45

1 Answer 1


You can make the procedure have its on transaction - called an autonomous transaction, but be careful with this one, you can easily get yourself into deadlocks if you use it carelessly without knowing your transactions.

create or replace procedure p1 (...) as
  pragma autonomous transaction

Usually this is used for logging purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.