SQL DBA Blog: Home

  • DBA Scripts: Get Replication Agent Status

    Part of the DBA-Tools Project. Publications Look Fine. Are the Agents Actually Keeping Up? Replication Status tells you what’s published and subscribed. It doesn’t tell you whether the jobs actually moving that data, the Log Reader Agent and the Distribution Agent, are keeping up, or whether a backlog is quietly building between them. This post…

    read more

  • DBA Scripts: Get Last Node Blip

    Part of the DBA-Tools Project. When Did This FCI Last Move, and Why On a Failover Cluster Instance (FCI), every node blip, planned or not, causes SQL Server to restart on whichever node picks it up. That restart resets sqlserver_start_time, which makes instance uptime itself a clue: a suspiciously short uptime on an FCI you…

    read more

  • DBA Scripts: Get Mirroring Endpoint Health and Status

    Part of the DBA-Tools Project. Still Running Database Mirroring? Here’s What to Check Database Mirroring has been deprecated since SQL Server 2012, Always On Availability Groups are the supported replacement for any new deployment. But deprecated doesn’t mean gone: plenty of instances still run it, migrations to AG take time, and a mirrored database left…

    read more

  • DBA Scripts: Get AG Failover Readiness and Readable Secondary Usage

    Part of the DBA-Tools Project. Would a Failover Actually Succeed Right Now, and Is Anyone Using the Secondary? AG Replica Role and Synchronization State tells you the current health of every replica. This post answers two sharper, more specific questions on top of that: if the primary failed right now, would the failover actually succeed,…

    read more

  • DBA Scripts: Storage and Capacity

    Part of the DBA-Tools Project. A SQL Server running out of room fails in several different ways depending on exactly which resource ran out: a full data file stops inserts, a full log file freezes the whole database, a full disk volume takes down everything on it, and a database quietly approaching a configured file…

    read more

  • DBA Scripts: Get Filegroup Space

    Part of the DBA-Tools Project. The Filegroup That’s Actually About to Run Out Database Free Space Summary tells you a database has plenty of room overall. That can still be wrong for a specific filegroup: a database on multiple filegroups can look comfortable in total while its PRIMARY filegroup, or a specific secondary filegroup an…

    read more

  • DBA Scripts: Get Database Growth Risk and Forecast

    Part of the DBA-Tools Project. Two Different Questions: “Is It Close?” and “When Will It Hit?” “How close is this database to its configured size limit?” and “at its current growth rate, when will it actually get there?” are two different questions, and answering them needs two different scripts. The first is a snapshot you…

    read more

  • DBA Scripts: Get Database Free Space Summary

    Part of the DBA-Tools Project. Allocated vs Used, Split by Data and Log, Every Database, One Pass Database Files Detail gives you file-level detail. This script gives you the consolidated view above that: allocated, used, and free space for every online database, split into data and log separately, with human-readable units (MB/GB/TB) and raw numbers…

    read more

  • DBA Scripts: Get Login and Job Inventory

    Part of the DBA-Tools Project. Two Plain Inventories Every Migration Plan Needs Permissions and Role Membership and SQL Agent and Jobs already cover the deep-dive on access and job health. These two scripts are the plain, focused inventory underneath both: Get-LoginInventory lists every server login by type and status, no permission detail, just what exists.…

    read more

  • DBA Scripts: Get Index Usage Stats

    Part of the DBA-Tools Project. The Raw Usage Data Behind Every Index Decision Unused Indexes already filters straight to drop candidates in one database. This script is the raw data underneath that filter, and more: every index across every user database, its seeks, scans, lookups, and updates, classified into a usage pattern, with no filtering…

    read more