Use SET XACT_ABORT ON to prevent client timeouts from leaving transactions and locks open, with TRY CATCH and a sleeping-session query.
A Shrink That Stops Blocking Others: SHRINKFILE WAIT_AT_LOW_PRIORITY
A shrink at 4 PM on Friday can block your whole app. See what the low-priority option does, and why shrinking is still a rare tool.
The Outbox Table: Publishing Changes Reliably From a Transaction
Orders commit and the message vanishes? Save both in one transaction, then let a worker claim, send and retry with a lease. Duplicates are still possible.
Record Checkout in SQL Server: A Visible Lock With an Expiry Time
Record checkout puts the name of the editor and an expiry time on the row, so a screen can show who has it. This post builds it with one UPDATE and proves it with two sessions that race for 2,000 rows. A check-then-update version gives some rows two winners, and the one-statement version never does. It also covers expired locks, late saves and check-in. Every result comes from SQL Server 2025.
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.







