I deployed a schema change to 30 servers using multi-server query and deploy-at-low-priority. Small servers with zero activity showed no progress, and then all 30 finished at the same time.
When I'm looking at a query, I bet it's bad if I see... a shopping list of red flags I've learned to spot, from AI-generated code to SSMS map mode gut checks.
Someone hacked Digitown's municipality and stole classified documents. 45 million rows of router traffic, an IP lookup table, and KQL's anomaly detection to find who did it.
I trusted AI to redesign this blog, be my personal assistant, and organize my life. But I won't let it near a production database. Here's why that's not a contradiction - and what I learned about trust along the way.
What does SQL Server actually see when it parses your code? I built a free web tool that lets you paste TSQL and explore the abstract syntax tree - click a token, see the node, read the fragment.
Digitown's citizens are being targeted by phishing calls. Using KQL, I analyze call patterns - duration, hidden caller IDs, and disconnect behavior - to unmask the phisher.
Digitown's utility bills doubled overnight. Using KQL and the EXPLAIN feature, I dig through billing data to find duplicate charges and negative consumption.
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.
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.
A rant about fn_xe_file_target_read_file - the nvarchar(max) return type, broken time filtering, and the circular dependency for finding rollover files.
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.
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.
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.
My SSMS setup guide: layout tweaks, essential Options settings, hotkeys I can't live without, and miscellaneous tips for a better SQL Server Management Studio experience.
An index rebuild quietly blocked an async stats update, and the whole server started timing out. Here is the lock-partitioning repro and the SQL Server 2022 fix.
Grant Fritchey asked us to talk about our favourite SQL Server tool for T-SQL Tuesday #166. Mine is Extended Events - and I have the GitHub repo and a public speaking session to prove it.
Create an Extended Events session with just a filename and the .xel file lands somewhere - but where? Here's what the default path is and how to change it.
You've learned why Scalar UDFs are slow and how to remove them. The last question: where do you even start? Here's how I triage them across a whole environment.
Print Screen and Paint never cut it for me. Greenshot did: precise region capture, a real annotation editor, obfuscation, and one-key sharing. Here's the tour.
Nuke them from orbit, or inline them. The practical ways to neutralize Scalar UDF performance pain, from a free SCHEMABINDING win to a full ITVF rewrite.
My daughter's LEGO game makes you re-enter every cheat on a clunky six-dial lock. So I built a TSQL solver to find the shortest path through all of them.
A colleague needed to find who was changing a specific cell in a busy table. SQL Audit was too noisy, Query Store too vague. I found a way to combine triggers with Extended Events for surgical precision.
Investigation8 min readExtended Events · Debugging
This month's T-SQL Tuesday invitation is from John McCormack. I'm sharing a few handy snippets I use on a regular basis - a time loop, impersonation testing, database recreation, and some RegEx for SSMS Find & Replace.
Work-life balance has been my focus for the past year and I've already made some changes to my lifestyle. Now it's time to take a look back and evaluate.
It took three tries before containers clicked for me. Each time I learned a bit more, but it wasn't until I had my own project that it all came together.
Brent Ozar asked the SQL community about their favourite data type. My answer surprised even me - sql_variant. Here's why, plus the data type I can't stand.