

Give the agent a tool, not a login
Eleven rules from putting production SQL Server data behind an AI assistant, read-only, with the receipts. In September we put an AI assistant in front of our production databases. Support staff ask it questions in chat ("what is the customer type of this account?", "did this message get delivered?") and it answers from live data in seconds. Nobody who asks holds a database login. The assistant doesn't hold one either, not in the way you'd expect . This post is the design, th
3 days ago7 min read


Nobody Chose 704, and That’s Why SQL Alerts Wouldn’t Stop
A monitoring probe kept firing “SQL Connection Error — Disaster” and clearing itself sixty seconds later. The engine never went down. It was never CPU-starved. It simply had no worker left to hand the next login. This is how I proved that from the DMVs, why max worker threads was the right lever in this one specific case, and the single check that tells you whether it is the right lever for you — because most of the time it isn’t. “Raise max worker threads” is the kind of adv
Sep 2110 min read


52 Rules, 5 Dialects, Zero Installers: The SQL Analyzer
nitsql — a multi-dialect SQL static analyzer: 52 rules across SQL Server, PostgreSQL, Oracle, MySQL and SQLite. Finds SQL injection, non-SARGable predicates, missing indexes, connection leaks and error-handling gaps — in .sql files and in SQL embedded in Python, Node.js and C#. Runs as a CLI, a CI gate, a pre-commit hook, or a Claude Code skill. Open source, MIT. We maintain quite few SQL Server database repositories — thousands of stored procedures, functions and views, most
Sep 1511 min read


Zero Downtime, Eight Surprises: Upgrading a Production SQL Server 2022 Always On Cluster to Windows Server 2025
I recently ran an in-place operating-system upgrade of a production, two-node SQL Server Always On Availability Group from Windows Server 2022 to Windows Server 2025 — with zero planned downtime and SQL Server left on 2022. It mostly went to plan. The parts that didn't are the reason this post exists. Everything below is anonymized, but the sequence, the commands, and the failures are exactly what we hit. The setup Two nodes — call them SQLNODE01 and SQLNODE02 — running SQL S
Sep 1513 min read


Every Server Grades Its Own Health: The SQL Report That Runs Itself
I used to open a chat window and ask my AI assistant to health-check the database fleet whenever I remembered to. It worked great — but "whenever I remembered" is a lousy schedule. So I taught the same health check to run itself: every production database server now grades its own health once a week and drops a color-coded report card into our team channel. No one logs in. No one runs anything. Here's the story — and a real (anonymized) report at the end so you can see exactl
Sep 36 min read


A Read-Only SQL MCP, Powered by dbatools
Every production database investigation I've ever done started the same way: cold. An alert fires — "DB Call Failures," a blocking spike, a node that just failed over — and the clock starts. I open RPDs, dozen SSMS tabs, remember which server is the primary this week, paste in the same wait-stats query I've pasted a thousand times, and start piecing together what happened. The knowledge of how to investigate lived in my head and a folder of .sql snippets. None of it was avail
Aug 2912 min read
![[Part 2] SQL Server 2022 Crashes — When the Fix Doesn’t Hold: A Second Root Cause Hiding Behind the First](https://static.wixstatic.com/media/46731a_fa73ba43b8dc406ca299be3be01f50bc~mv2.png/v1/fill/w_187,h_250,fp_0.50_0.50,q_35,blur_30,enc_avif,quality_auto/46731a_fa73ba43b8dc406ca299be3be01f50bc~mv2.webp)
![[Part 2] SQL Server 2022 Crashes — When the Fix Doesn’t Hold: A Second Root Cause Hiding Behind the First](https://static.wixstatic.com/media/46731a_fa73ba43b8dc406ca299be3be01f50bc~mv2.png/v1/fill/w_265,h_354,fp_0.50_0.50,q_95,enc_avif,quality_auto/46731a_fa73ba43b8dc406ca299be3be01f50bc~mv2.webp)
[Part 2] SQL Server 2022 Crashes — When the Fix Doesn’t Hold: A Second Root Cause Hiding Behind the First
In my last post I traced a wave of EXCEPTION_ACCESS_VIOLATION (0xc0000005) crashes on our SQL Server 2022 fleet to an EDR heap-hook incompatibility on Windows Server 2025, and walked through the cross-server comparison that pinned it down. That conclusion held up — for that crash signature. What it didn’t do was stop the bleeding. A few nodes kept crashing after the EDR remediation. Same exception code, but when I actually read the dumps frame by frame, it was a different fau
Jun 199 min read















