SQL DBA Blog: Home

  • DBA Scripts: Get Heaps

    Part of theDBA-Tools Project. Heaps in SQL Server Explained A surprising amount of SQL Server performance pain comes from tables that were never given a clustered index. These heaps often start life as quick prototypes, staging tables, or legacy leftovers — but as data grows, they quietly become one of the most consistent sources of…

    read more

  • DBA Scripts: Get SQL Server Database File Details

    Part of the DBA-Tools Project. Understanding SQL Server Database File Layout SQL Server database files are one of those areas where small configuration issues can become large operational problems. A database may be running perfectly today, but poor file placement, incorrect growth settings, or uncontrolled file expansion can create problems later. Storage issues are one of the…

    read more

  • DBA Scripts: Get Sysadmin Members

    Part of theDBA-Tools Project. Identify SQL Server Logins With Sysadmin Access The sysadmin fixed server role provides unrestricted access to a SQL Server instance. Members of this role can perform any operation on the server, including creating databases, changing security settings, accessing all data, and modifying server configuration. Because of this level of privilege, knowing…

    read more

  • DBA Scripts: Get Database Sizes and Free Space

    Part of theDBA-Tools Project. Get SQL Server Database Sizes and Free Space Database size checks are one of the first things I review when assessing a SQL Server environment. The goal is simple: understand where storage is being consumed, identify databases that need attention, and make sure there is enough capacity for normal growth. In…

    read more

  • DBA Scripts: Get VLF Counts

    Part of the DBA-Tools Project. VLFs – The Hidden Log Performance Problem Virtual Log File (VLF) count is one of those SQL Server health checks that is often overlooked. It rarely generates alerts, doesn’t usually slow down a single query, and most users never know it exists. Yet an excessive number of VLFs can quietly…

    read more

  • DBA Scripts: Generate Test Databases

    Related Pillar Post: Backups and Recovery When you’re validating migrations, failover, or automation at scale, you need realistic volume: hundreds or thousands of databases to stress-test backups, restores, log shipping, and copy operations. This helper automates that setup, it creates batches of small, randomized databases with configurable sizes and naming, so you can reproduce large-scale…

    read more

  • Installing Windows Terminal on Windows

    Windows Terminal is the modern command-line application for Windows and supports PowerShell, Command Prompt, and WSL in a single interface. On recent versions of Windows (Windows 11 and newer), Windows Terminal is installed by default. If it’s already available on your system, no installation is required. If it isn’t installed, or you’re working on older…

    read more

  • How to Enable Change Data Capture (CDC) in SQL Server

    Change Data Capture (CDC) allows SQL Server to track inserts, updates, and deletes on selected tables by reading the transaction log and storing changes in system tables. From a DBA point of view, CDC is easy to enable but easy to underestimate. It adds background jobs, ongoing storage growth, and operational overhead that needs to…

    read more

  • DBA Scripts: Get Service Broker Health and Database Mail Queue

    Part of the DBA-Tools Project. Two Messaging Systems That Run Quietly Until They Don’t Service Broker and Database Mail are both messaging infrastructure, and both are easy to forget are even active, since SQL Server uses Service Broker internally for things like Availability Group health checks, and Database Mail just sits there until something needs…

    read more

  • DBA Scripts: Get Collation Conflicts and Cross-Database Dependencies

    Part of the DBA-Tools Project. Two Things That Break Silently at Migration or Decommission Time Two checks that rarely matter until the exact moment they do: does this database’s collation match the server’s (and every other database it might join against), and does anything in this database reach into another database or another server by…

    read more