Temp table versus table variable, part two: a transaction rollback undoes changes to a temp table, but a table variable keeps its values.
Following a Blocking Chain to the Head Blocker
Follow SQL Server blocking_session_id through a blocking chain, identify the head blocker, and choose a safe ending for the wait.
Preventing Overlapping Date Ranges in a Table
Detect overlapping date ranges with joins and window queries, use half-open endpoints, and enforce the rule with a multirow trigger.
Finding Sleeping Sessions That Still Hold Locks
Find sleeping sessions with open transactions, inspect their locks and last batch, and identify the application owner before ending work.
Preventing Overbooking When Two Sessions Grab the Last Seat
Learn preventing overbooking through a last-seat race, an atomic update, update locks, and a database constraint that rejects oversold inventory.
SQL SERVER – Interesting Observation of DMV of Active Transactions and DMV of Current Transactions
sys.dm_tran_active_transactions and sys.dm_tran_current_transaction look alike, but one lists active transactions for the instance, the other only your session.







