Monday, August 31, 2009

MCTS 70-433 Nested Transactions in SQL Server

Nested transaction are always fun, I remember once chasing own a transaction (J2EE Weblogic / Oracle) which the developer saw as committed in their code but was somehow getting roled backed ...



http://stackoverflow.com/questions/851441/nested-transactions-in-sql-server


Question:  Does sql server allow nested transactions? If so then whats the priority of transactions?

Most Popular Answer: From the MSDN documentation on SQL Server. Nesting Transactions:

Committing inner transactions is ignored by the SQL Server Database Engine. The transaction is either committed or rolled back based on the action taken at the end of the outermost transaction. If the outer transaction is committed, the inner nested transactions are also committed. If the outer transaction is rolled back, then all inner transactions are also rolled back, regardless of whether or not the inner transactions were individually committed.

No comments: