Author: Peter Whyte

  • DBA Scripts: Storage and Capacity

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

  • DBA Scripts: Get Filegroup Space

    ,

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

  • DBA Scripts: Get Database Growth Risk and Forecast

    ,

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

  • DBA Scripts: Get Database Free Space Summary

    ,

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

  • DBA Scripts: Get Login and Job Inventory

    ,

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

  • DBA Scripts: Get Index Usage Stats

    ,

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

  • DBA Scripts: Get Database Snapshot Inventory

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity The Snapshot Everyone Forgot They Created A database snapshot is created for one specific reason, a pre-deployment rollback point, a reporting-consistency workaround, a test before a risky change, and then it just sits there. Snapshots don’t show up in a…

  • DBA Scripts: The Complete Guide

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. Where to Start With This Series The DBA Scripts series on this blog covers backups, blocking, indexes, SQL Agent, query performance, extended events tracing, server inventory, and security, organized into eight areas of the job, each one tying together a cluster of scripts…

  • DBA Scripts: Get TempDB Usage and File Balance

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity How Full TempDB Is Right Now, and Whether Its Files Are Set Up Correctly TempDB Configuration and TempDB Hotspots already cover configuration baseline and allocation-contention diagnosis. These two scripts fill the gap between them: Get-TempdbUsage shows exactly how full each…

  • DBA Scripts: Get Query Performance Deep-Dive

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning Four Angles on “Why Is This Slow” That Go Beyond Top CPU Top CPU Queries ranks by raw resource consumption. These four scripts answer more specific questions the ranking alone can’t: Get-StoredProcedurePerformance ranks stored procedures…