SQL DBA Blog: Home

  • DBA Scripts: Maintenance and Automation

    Part of the DBA-Tools Project. Is the Automation Healthy, and Is It Actually Doing the Job A SQL Agent job that silently stopped running is one of the quietest failure modes in SQL Server, nothing errors, nothing alerts, the work it used to do just stops happening until someone notices the symptom weeks later. This…

    read more

  • DBA Scripts: Performance and Troubleshooting

    Part of the DBA-Tools Project. Four Ways of Answering “Why Is It Slow” “The database is slow” is rarely one problem. Sometimes it’s a query, a bad plan, a stale statistic. Sometimes it’s blocking, and the fix is completely different depending on which one it actually is. Sometimes the DMV snapshot has already missed the…

    read more

  • DBA Scripts: Server and Configuration

    Part of the DBA-Tools Project. What This Server Is, and How It Got That Way Two pillars, one underlying question: before performance, before security, before anything else, what is this SQL Server instance, and how did it come to be configured the way it is. Server Inventory answers the first half, a snapshot of what’s…

    read more

  • DBA Scripts: Collectors and Baseline Infrastructure

    Part of the DBA-Tools Project, in the Performance and Troubleshooting area. From “Check When Asked” to “Already Watching” Every other pillar on this site answers a question the moment you ask it: what’s blocking right now, what are the current wait stats, how much free space is on disk today. The Collectors pillar is different.…

    read more

  • DBA Scripts: Generate Collector Alerts

    Part of the DBA-Tools Project. The Job That Reads Every Other Collector and Actually Tells You Something’s Wrong Every collector in this pillar writes evidence somewhere, blocking chains, deadlocks, wait stats, VLF counts, database growth, TempDB pressure. None of them, on their own, tells anyone anything. Generate-CollectorAlertJob.sql is the cross-cutting piece: one recurring job that…

    read more

  • DBA Scripts: Collect Health and Configuration Baselines

    Part of the DBA-Tools Project. Four Collectors, One Real Table-Design Bug Found Testing Them Four different rhythms: AG health every few minutes if you’re running Availability Groups, index fragmentation weekly, Query Store’s top queries every 30 minutes, error log entries every 10. Testing the AG health collector against a real instance surfaced a genuine table-design…

    read more

  • DBA Scripts: Collect Capacity and Temp DB Baselines

    Part of the DBA-Tools Project. Three Collectors, Three Real Bugs Found Testing Them DatabaseGrowth and VlfCount are system-versioned temporal tables, always current, no manual history-cleanup needed. The TempDB collector snapshots both file-level space and the top 10 session consumers in one pass. All three sounded correct on read-through. None of them ran cleanly the first…

    read more

  • DBA Scripts: Collect Performance Baselines (Wait Stats, Perfmon, Storage I/O)

    Part of the DBA-Tools Project. Three Cumulative Counters, Three Matching Delta Scripts sys.dm_os_wait_stats, sys.dm_os_performance_counters, and sys.dm_io_virtual_file_stats are all cumulative since the instance last started, a raw snapshot of any of them tells you almost nothing on its own. Three collector generators snapshot each on a schedule, and three matching Get-*Delta.sql scripts compute what actually changed…

    read more

  • DBA Scripts: Collect Blocking and Deadlock Events

    Part of the DBA-Tools Project. Standing Watch for Blocking and Deadlocks, Not Just Checking When Asked Get Blocking Sessions and Get Deadlock Summary answer “what’s happening right now.” These two generators answer a different question: “what happened while nobody was looking.” Each creates a small recurring SQL Agent job that writes evidence into a DBAMonitor…

    read more

  • DBA Scripts: SQL Server Installation and Patching

    Part of the DBA-Tools Project, in the Server and Configuration area. Ten scripts covering a SQL Server instance’s whole install-to-patch lifecycle: confirm a machine is ready, install unattended, apply sensible defaults, validate the result, keep it patched, and remove it cleanly when it’s done, for both the SQL Server engine and SSMS. Six posts below,…

    read more