Skip to content
Advertisement

Can I rollback a transaction that has multiple inner transactions in SQL Server?

I hear if there are nested transactions, the inner transactions will not be committed.

For example, I have a Parent Procedure and about a handful of children procedures each with begin tran/commit/rollback.

I need to debug the parent procedure but I need to rollback the transaction at the end instead of committing everything it did. It’s a huge procedure.

If I do

Will everything that happened in all procedures be rolledback assuming no errors anywhere?

Advertisement

Answer

Thank you for the replies. It looks like the answer is yes, everything will be rolledback.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement