Category: DBA Scripts

  • DBA Scripts: Get Database Summary

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.Related pillar: Server & Configuration One Row Per Database, Every Issue Flagged in One Column Checking every database on an instance one at a time, state here, recovery model there, backup age in a third window, doesn’t scale, and it’s exactly the kind of…

  • DBA Scripts: Get Database Inventory

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.Related pillar: Server & Configuration One Query, Every Database’s Migration Readiness Before you migrate, upgrade, or consolidate anything, you need one honest answer per database: is it actually online, what recovery model is it running, and is its compatibility level going to surprise you…

  • DBA Scripts: Pre-Install and Post-Install Checks for SQL Server

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.Related pillar: Server & Configuration Start Here Will this build actually run here?OS and Hardware InfoWhat did the installer leave at defaults?Configuration SnapshotHow does the finished build score?Configuration ScoreWhat are the install steps themselves?Install and Configure Bookend Checks for an Installation You Can Trust…

  • DBA Scripts: Generate Database Integrity and Housekeeping Jobs

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. A Readable Generator for Integrity Checks and msdb Housekeeping If you’re already running Ola Hallengren’s maintenance solution, this won’t replace it, but the approach here might still be useful: a small, readable T-SQL generator that builds a housekeeping job framework as plain sp_add_job…

  • DBA Scripts: Generate Backup Jobs

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. A Readable Generator for Full Backups, Log Backups, and Cleanup If you’re already running Ola Hallengren’s maintenance solution, this won’t replace it, but the approach here might still be useful: a small, readable T-SQL generator that builds a backup job framework as plain…

  • DBA Scripts: Run a Full SQL Server Health Check

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.Related pillar: Performance & Troubleshooting Most of the 181 scripts on this site answer one specific question, run when you already know what you’re looking for. This post is different. It’s the workflow for the moment you don’t know what to look for yet,…

  • DBA Scripts: Get Job Schedules and Duration Trends

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. When Jobs Run, and Whether They’re Taking Longer to Do It SQL Agent Job Failure Summary tells you what broke. These two scripts answer two quieter but just as important questions: Get-JobScheduleSummary shows exactly when every enabled job is scheduled to run next,…

  • DBA Scripts: Get Lock Escalation, Contention Analysis, and Blocking Chains with Plan

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. Three Different Views of the Same Underlying Problem Blocking Chains shows what’s blocked right now. These three scripts go wider and deeper: Get-LockEscalationStats finds which tables have converted row/page locks into full table locks (a common, self-inflicted cause of blocking), Get-ContentionAnalysis rolls up…

  • DBA Scripts: Get Trace Flags and Resource Governor Configuration

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. Two Things a Previous DBA Might Have Set and Never Told You Trace flags and Resource Governor are both instance-wide behavior changes that don’t show up in sp_configure at a glance, don’t appear in the database, and can sit silently in place for…

  • DBA Scripts: Get CPU Topology and OS Configuration Checks

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. What CPU and OS Settings Are Actually Doing to SQL Server OS and Hardware Info tells you what hardware exists. These two scripts go one level deeper: how SQL Server is actually scheduling work across that hardware, and whether a handful of OS-level…