top of page


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
5 days ago11 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
6 days ago13 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_333,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_454,h_341,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
![[Part 1] SQL Server 2022 Engine Crashes on Windows Server 2025 — Tracing the Cause to an EDR Heap Hook Incompatibility](https://static.wixstatic.com/media/46731a_bec6851d7d7947b18114fb31eb9a2aa9~mv2.jpg/v1/fill/w_333,h_250,fp_0.50_0.50,q_30,blur_30,enc_avif,quality_auto/46731a_bec6851d7d7947b18114fb31eb9a2aa9~mv2.webp)
![[Part 1] SQL Server 2022 Engine Crashes on Windows Server 2025 — Tracing the Cause to an EDR Heap Hook Incompatibility](https://static.wixstatic.com/media/46731a_bec6851d7d7947b18114fb31eb9a2aa9~mv2.jpg/v1/fill/w_454,h_341,fp_0.50_0.50,q_90,enc_avif,quality_auto/46731a_bec6851d7d7947b18114fb31eb9a2aa9~mv2.webp)
[Part 1] SQL Server 2022 Engine Crashes on Windows Server 2025 — Tracing the Cause to an EDR Heap Hook Incompatibility
[UPDATED] In March 2026, our production messaging-database cluster started crashing again. Same exception code as the incident we resolved last year (0xc0000005, Access Violation), but a different stack signature, different servers, different cloud, and ultimately a completely different root cause. This time the bug wasn't in SQL Server. It wasn't in the storage drivers. It wasn't in our queries. It was in something we'd never have suspected without comparing the crashing ser
May 2513 min read


SQL Server 2022 Enterprise Repeated Engine Crashes (Access Violation Exceptions)
In late October 2025, our production SQL Server 2022 Enterprise cluster running on AWS EC2 started crashing repeatedly with Access Violation (0xc0000005) exceptions. This wasn't just any database going down — this cluster is the heart of the business. It powers the core platform that our customers depend on every day: real-time communications services, call routing, messaging, and the APIs that integrate with everything downstream. When this database cluster goes offline, the
Feb 276 min read


When Forced Quorum Mode Haunts You
It was a regular Thursday afternoon. The kind where you're wrapping up tasks, maybe thinking about what to have for dinner. And then, at 4:36 PM, the alerts started rolling in. Transaction processing delays. Partial database inaccessibility. The production database cluster — the one that powers core services for an entire region — was going down. Not because of a hardware failure. Not because someone fat-fingered a config change. But because of something far more subtle: a gh
Feb 245 min read


The Two Settings That Fixed Our Production CPU Crisis
How default SQL Server configuration brought a production server to its knees — and how two settings fixed it in under a minute. The Escalation It started with a message from my manager: Attached was a screenshot of CPU pinned near 100%. Not a good look on a production server handling live traffic. The Investigation My first instinct was to hunt for a rogue query. That's usually the culprit — some poorly optimized SELECT statement doing a full table scan, or a report running
Feb 145 min read
bottom of page