The Hidden Effect of Rolling Back Transaction from Triggers

Yes, you can rollback a transaction from a trigger. But just because you can doesn”t mean you should. In the contrary – if you do not catch exceptions on the SQL Server side, using a ROLLBACK statement inside triggers put you in serious risk. Understanding T-SQL Error Handling If you asked me what part of [...]

Nested Transactions in SQL Server

If you think there is such a thing as nested transaction in SQL Server, this post is for you. Nesting Transaction vs. Nested Transactions Technically you can begin a new transaction inside another one. What’s more, there is @@TRANCOUNT function that returns current transaction nesting level. Note. This function is quite handy as there is [...]