Notes from a TSQL trench

Database stuff,
with a side of memes.

Long-form notes on TSQL performance, Extended Events, Query Store and the tooling around them. Written from the trenches, not the slide deck.

58 posts 4 series 107+ memes
KDA: Echoes of Deception - Onboarding

KDA: Echoes of Deception - Onboarding

A walkthrough of the Kusto Detective Agency UI and the onboarding challenge - finding which detective earned the most bounty money in 2022.

How to 3 min read KQL
Kusto Detective Agency - Intro

Kusto Detective Agency - Intro

I have a soft spot for Kusto. This series walks through the Kusto Detective Agency challenges - data mysteries you solve with KQL instead of a magnifying glass.

How to 2 min read KQL
Deploy at Low Priority

Deploy at Low Priority

A utility script for deploying schema changes without a maintenance window - using a time-based loop, lock checking, and GOTO to minimize blocking on busy SQL Servers.

How to 5 min read Blocking · Locking
Finding nested references

Finding nested references

Your stored procedure calls another procedure, which calls a view. How deep does it go? Here's a recursive CTE that traces the full dependency chain, including cross-database references.

Investigation 8 min read Debugging
Database CI/CD Basics (T-SQL Tuesday #177)

Database CI/CD Basics (T-SQL Tuesday #177)

A crash course on database CI/CD: source control as the source of truth, state-based vs migration-based versioning, and the many moving parts of automated database deployments.

T-SQL Tuesday 4 min read CI/CD
Service Broker Blocking

Service Broker Blocking

I was paged for a blocking chain where the lead blocker had a transaction name I'd never seen: CSbRollbackHandlerTask::DisableQ. Here is how I reproduced it and why the blocked process report refuses to help.

Deep Dive 4 min read Blocking · Debugging