SQL DBA Blog: Home

  • DBA Scripts: Get Database Summary

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory 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…

    Read More


  • DBA Scripts: Get Database Inventory

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory 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…

    Read More


  • Instant File Initialization: What It Actually Does and How to Enable It

    Instant File Initialization is one of the few SQL Server settings that’s genuinely free performance: no license cost and no downside for the overwhelming majority of installs. It’s still routinely left unconfigured on real production servers, because it’s a Windows privilege grant rather than a SQL Server setting, and it happens outside SSMS entirely. This…

    Read More


  • 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.In: Server & Configuration › Installation & Patching You are standing up a new SQL Server instance, or you have inherited one and want to know what state it is really in. These 2 read-only PowerShell scripts sit either side of setup: pre-install-check.ps1 tells…

    Read More


  • Disable Change Data Capture in SQL Server

    Turning Change Data Capture off for a database takes one command, sys.sp_cdc_disable_db. It disables every tracked table itself, then drops the cdc schema, the change tables and both CDC Agent jobs. Disable tables one at a time only when you want CDC to stay on for the rest, or when the database has a lot…

    Read More


  • SET Options Have Incorrect Settings (Error 1934)

    SQL Server error 1934 means the connection running the write has the wrong SET options for a filtered index or indexed view. Reads still work, which is why it usually shows up as one failing job.

    Read More


  • DBA Scripts: Generate Database Integrity and Housekeeping Jobs

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Maintenance & Automation › Maintenance Job Framework A Readable Generator for Integrity Checks and msdb Housekeeping No DBCC CHECKDB has run in weeks, msdb keeps growing, or the error log is one enormous file: this generator writes the 3 SQL Agent jobs that…

    Read More


  • DBA Scripts: Generate Backup Jobs

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Maintenance & Automation › Maintenance Job Framework 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…

    Read More


  • JSON in SQL Server: OPENJSON, FOR JSON, and the Native JSON Type

    SQL Server has had JSON functions since 2016, and SQL Server 2025 added a native JSON data type on top of them. Most write-ups explain the syntax; fewer show what actually differs between storing JSON as text and storing it as the native type, or when reaching for JSON in a relational database is the…

    Read More


  • DBA Scripts: Run a Full SQL Server Health Check

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Maintenance & Automation › Collectors & Baselines Inherited a server, or sure something is wrong but not what? One command runs 45 read-only checks against the instance. A second turns the results into a ranked CRITICAL / WARNING / INFO list. An optional…

    Read More