Short blocking is normal. This check flags lock waits past a threshold and walks each chain to the session at the front of the line.
Materialized Path Hierarchies: Storing the Path as a String
Build a materialized path hierarchy in T-SQL, query descendants, calculate depth, and move a subtree without creating cycles.
Forecasting the Disk-Full Date From a Daily File Size History
Free space today cannot tell you when the drive fills up. Save daily file sizes and let a short query turn the growth into a date.
SQL SERVER – The Flight Connection Puzzle
Today we are going to see another such puzzle – The Flight Connection Puzzle. This blog post is going to be really fun blog post.
Running Distinct Counts: Working Around COUNT(DISTINCT) OVER
Your report wants unique customers so far, and SQL Server refuses COUNT(DISTINCT) over a window. Flag each first appearance and add up the flags instead.
Schema-Level Permissions: Granting on a Schema, Not Each Object
Apply schema-level permissions to a database role, include future tables automatically, separate internal data, and review grants.
Given-When-Then for Database Tests
Use Given-When-Then for readable database tests with known input, explicit THROW checks, and transaction rollback after each case.







