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.

150+scripts you can run directly
45signals in one health check
1 reportroot-cause summary
🤖 NewGive your AI assistant a verified SQL Server reference The same hand-verified reference behind these pages, as an MCP server your assistant can call directly. Paste an error number and get the checked answer instead of a plausible one, with a link back to the write-up every time. It never connects to your SQL Server and it needs no API key. Six tools, capped:lookup_errorexplain_waitcheck_buildfind_scriptget_scriptanswer_question Read the write-up and install it →

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.

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.

Peter Whyte, SQL Server DBA

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.