Retrying a deadlock victim works when the retry repeats the whole transaction. This post builds a bounded T-SQL retry for error 1205 and tests it against a real deadlock between two sessions. It then shows two cases where a retry does harm: inside an outer transaction and on an error that is not a deadlock. Every result comes from SQL Server 2025.
State Machine in T-SQL: Allowed Status Changes for an Order
A state machine in T-SQL keeps the allowed status changes in a table and rejects every other change. This post builds one for orders with a transitions table and a trigger, then tests a bad jump, several rows in one UPDATE, new orders, a transaction and a new rule. Every result comes from SQL Server 2025.
SQL SERVER – What is the Maximum Relational Database Size Supported by Single Instance?
How much data can SQL Server handle? The maximum relational database size is 524 PB in SQL Server 2008 R2, 2012 and 2014, with a lower limit for Express.
Finding Which Statistics a Query Used in the Execution Plan
Find which statistics a query used through OptimizerStatsUsage in actual-plan XML, cached plans, and Query Store history.
SQL SERVER – Database in RESTORING State for Long Time
Database stuck in restoring state after you restored every backup? Usually the last log was restored without RECOVERY. Here is how to bring it online.
Change Data Capture or Change Tracking
Change data capture or change tracking serves different sync needs; compare captured detail, retention, cleanup, and operating cost before choosing.
WAITFOR DELAY in SQL Server: SQL in Sixty Seconds #055
WAITFOR DELAY pauses a SQL Server batch for a fixed amount of time. This episode shows the command, and the tests here measure how long it really waits, what it does to locks and workers, and where it stops being the right tool.






