SQL DBA Blog: Home

  • CXPACKET and CXCONSUMER Wait Types in SQL Server

    Part of the SQL Server Wait Types Library CXPACKET and CXCONSUMER appear whenever SQL Server runs a query using parallelism. They are the coordination overhead between parallel worker threads, not actual resource waits. They almost always appear together. If you’re on SQL Server 2016 or older, you’ll only see CXPACKET. Is This Wait Expected? Yes,…

    read more

  • DBA Scripts: Get Maintenance Job Status

    Part of the DBA-Tools Project. A maintenance job that’s silently failing is one of the more dangerous states a SQL Server instance can be in, because everything looks normal from the outside. The database is online, queries run fine, and the index maintenance or stats update job that’s supposed to be keeping things healthy has…

    read more

  • DBA Scripts: Get Instance Configuration Score

    Part of the DBA-Tools Project. Get Instance Configuration Snapshot gives you every raw sp_configure setting; useful, but it doesn’t tell you which of those hundred-plus rows actually matter. This script is the graded version: roughly 20 checks spanning memory, security, backups, integrity, and database settings, each scored PASS, WARN, or FAIL against practical best-practice thresholds,…

    read more

  • DBA Scripts: Get Agent Alerts and Operators

    Part of the DBA-Tools Project. A SQL Server can raise a severity 19-25 error, the fatal, “something is genuinely broken” tier, corruption, out-of-resource conditions, hardware faults, and if there’s no alert configured for that severity, nothing happens. No email, no page, no ticket. The error sits in the error log where it will be found…

    read more

  • DBA Scripts: Get Query Store Status

    Part of the DBA-Tools Project. Query Store is the single most useful diagnostic feature SQL Server has shipped in the last decade, a built-in, per-database history of every query’s plans and runtime stats, no third-party tooling required. And it fails in one of the quietest ways possible: it either isn’t turned on at all, or…

    read more

  • DBA Scripts: Get Index Design Issues

    Part of the DBA-Tools Project. Most index problems aren’t about a single bad index, they’re about a table’s index design as a whole drifting out of shape over time. A table that accumulates 25 indexes because nobody ever removed the old ones. A composite key that grew column by column until it’s wider than SQL…

    read more

  • DBA Scripts: Get Implicit Conversions

    Part of the DBA-Tools Project. An implicit conversion is SQL Server quietly changing a data type to compare two values that don’t match, and it’s one of the few performance problems that will not throw an error, will not show up in a slow-query complaint, and will not appear anywhere in the object definition. The…

    read more

  • DBA Scripts: Get Database Health

    Part of the DBA-Tools Project. Before diving into anything deeper, a health check should start with the basics: is every database actually online, is the recovery model what it’s supposed to be, and is anything quietly stuck waiting for a log backup it isn’t getting. None of these are exotic checks, but they’re exactly the…

    read more

  • DBA Scripts: Get Duplicate Indexes

    Part of the DBA-Tools Project. Indexes accumulate the same way clutter does: one developer adds an index to fix a slow query, a colleague adds a near-identical one three months later because the first one wasn’t obvious from the name, and nobody ever goes back to check whether both are pulling their weight. Two indexes…

    read more

  • DBA Scripts: Get Statistics Health

    Part of the DBA-Tools Project. Query plans are only as good as the statistics SQL Server uses to build them. When a table’s data distribution changes but its statistics don’t get refreshed to match, the optimizer keeps making decisions based on a picture of the data that’s no longer true, choosing a scan when a…

    read more