SQL Server DBA Guides, Scripts, and AI Health Checks
Production-first SQL Server content from a working DBA: troubleshooting guides, copy-paste scripts, and a health check workflow where dba-tools collects the evidence and AI helps surface the blindspots.
If you run SQL Server in production, this site is built to help with the real work: incidents, performance, HA/DR, monitoring, backups, and repeatable diagnostics.
Prefer reading first? Browse the latest SQL Server posts.
The Major Pillars
Four reference libraries that the rest of the site hangs off. Whatever brought you in, an error message, a wait type, a script you need, the rest of that library sits one link away.
DBA Scripts
Every script on the site, grouped by the question it answers, with a decision matrix for picking between the ones that look similar.
- 150+ production scripts, copy and paste ready
- Grouped into eight areas of the job
- Each one with output you can read
SSMS Complete Guide
Install, update, connect and fix the client itself, including the certificate error that stops people connecting after an upgrade.
- Install and update, manual or scripted
- The connection errors, with real causes
- What moved to VS Code, and what did not
Error Library
Search by message text or error number and land on what actually causes it on a live server, not a restatement of the message.
- 47 errors in the finder
- Severity, cause and fix for each
- Written for someone mid-incident
Wait Stats Library
What the server is queueing on, wait type by wait type, with the benign ones filtered out so the list is short enough to act on.
- The full wait type reference
- Ranked by what actually matters
- Benign background waits filtered
The Health Check: dba-tools Plus AI
The workflow: gather evidence from the server, run deterministic checks, then let AI correlate patterns across the full dataset. It does not replace DBA judgment, it shortens the route to a confident diagnosis.
A 30-second run: terminal command, web UI output, then the same script in SSMS.
Where Do You Want To Start?
Each door is a shortlist of first moves, not a full index of the site.
Something Is Broken Right Now
An error number on screen, sessions stacked up behind something, or a restore that will not finish. Paste the message straight into the error finder for the cause and the fix, or run the full health check when you cannot yet say which part of the instance is in trouble.
Something Is Slow
No outage, but queries are slower than they were and nobody can say why. Start where SQL Server is actually spending its time, look up the wait type it reports, then work down to the queries, indexes and configuration behind it before you change anything.
Nothing Is On Fire
The quiet-day work that makes the loud days rarer. Take stock of an instance you have inherited, check your backup and high availability posture before you need it, and get monitoring baselines in place so the next problem arrives as a change you can see rather than a surprise.
Latest Posts
Everything on the site is maintained, not archived. This is what changed most recently.
- Cumulative Wait Stats Lie: Measuring Waits Over an Interval
- SQL Server Differential vs Log Backup: Which One Restores What, and How the Chain Breaks
- SQL Server MAXDOP and Cost Threshold: What To Set, and Why 5 Is Not a Recommendation
- SQL Server Log Won’t Truncate: What log_reuse_wait_desc Is Telling You
- sp_who vs sp_who2 vs sp_whoisactive in SQL Server
Browse By Topic
Every post rolls up into one of these areas, and each panel opens the hub that owns it.
More About Me
I am a SQL Server DBA working in large-scale production environments, working remotely from home in Edinburgh, Scotland.
My focus is on reliability, performance, and keeping systems running when they matter most. Most of my day-to-day work sits around operations, incident response, platform engineering, and automation, supporting SQL Server workloads that need to stay available and predictable under real pressure.
There is more on the about page: how the scripts get verified, what the site is for, and how to tell me when something here is wrong.

Pick a Practical Next Action
Whether you are in an incident or planning preventative work, start with one workflow and execute it end-to-end.