A failed SQL Server 2014 SP2 left the service down with: ALTER DATABASE statement not allowed within Multi-statement Transaction. Here is how to fix it.
SQL SERVER – How to Update Two Tables in One Statement?
One Statement normally updates one target table in SQL Server. I use a transaction when two changes must succeed together.
Triggers That Assume One Row: Fixing Them for Multi-Row Updates
Fix triggers for multi-row updates by joining inserted and deleted, testing complete audit coverage, and keeping transaction work small.
Upsert Patterns in SQL Server Without Race Conditions
Compare upsert patterns under concurrent calls, protect missing-key ranges, test MERGE with HOLDLOCK, and keep unique keys as a guard.
A Retry Loop in T-SQL for Deadlock Victims and Lock Timeouts
Build a bounded retry loop for deadlock and lock-timeout errors, roll back each failed transaction, and keep diagnostics beside retries.






