SQL DBA Blog: Home

  • DBA Scripts: Get Database Snapshot Inventory

    Part of the DBA-Tools Project. 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 routine size check the way a growing data file does,…

    read more

  • DBA Scripts: The Complete Guide

    Part of the DBA-Tools Project. 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, fourteen pillars in total, each one tying together a cluster of scripts that answer a…

    read more

  • DBA Scripts: Get TempDB Usage and File Balance

    Part of the DBA-Tools Project. 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 TempDB file is right now, broken down by user objects,…

    read more

  • DBA Scripts: Get Query Performance Deep-Dive

    Part of the DBA-Tools Project. 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 specifically, not ad-hoc queries. Get-QueryVariance finds queries whose execution time swings wildly between runs, the…

    read more

  • DBA Scripts: Get Active Sessions and Requests

    Part of the DBA-Tools Project. Who’s Connected, and What’s Actually Running Right Now Worker Threads and Active Sessions gives you the aggregate health number: how close the worker thread pool is to exhaustion. These three scripts give you the per-session detail underneath that number. Get-ActiveSessions lists every user session, connected or idle, with its current…

    read more

  • DBA Scripts: Get Suspect Pages and Integrity Checks

    Part of the DBA-Tools Project. Corruption Evidence Already Recorded, and a Pre-Check Before You Look Deeper Last DBCC CHECKDB tells you how stale your corruption checks are. These two scripts sit on either side of that: Get-SuspectPages surfaces pages SQL Server has already flagged as corrupt, evidence sitting in msdb.dbo.suspect_pages right now, not something you…

    read more

  • DBA Scripts: Security

    Part of the DBA-Tools Project. Who Can Do What, What’s Actually Happening, and What’s Silently Missing Security on an inherited SQL Server instance breaks down into three genuinely different questions, and a single “run a security scan” checklist tends to blur them together. Who has privileged access, right now? What’s actually happening at the login…

    read more

  • DBA Scripts: Get Audit Specifications, DDL Triggers, and Proxy Credentials

    Part of the DBA-Tools Project. Three Kinds of Infrastructure Most Servers Never Had in the First Place Some security infrastructure isn’t misconfigured, it just doesn’t exist. Get-AuditSpecifications checks for SQL Server Audit, the formal compliance mechanism for SOX/GDPR/PCI-DSS, and most inherited servers have none configured at all. Get-DdlTriggers finds server-level DDL triggers, a hidden dependency…

    read more

  • DBA Scripts: Get Certificates, Keys, and TDE Status

    Part of the DBA-Tools Project. The Encryption Layer Nobody Monitors Until It Expires Certificates created for TDE, backup encryption, or an Availability Group encrypted endpoint get created once and then quietly forgotten. An expired certificate doesn’t break TDE in memory on the server that has it, but it prevents restoring that TDE-encrypted database anywhere else,…

    read more

  • DBA Scripts: Get Login Security Audit

    Part of the DBA-Tools Project. What’s Actually Happening at the Login Level, Not Just Who’s Allowed Permissions and Role Membership covers who can do what. These three scripts cover something different: what’s actually happening at the login layer right now. Get-FailedLoginSummary surfaces brute-force patterns and locked accounts from the error log. Get-LoginLastActivity shows current session…

    read more