🔧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 cover the deep dive. These two are the plain inventory underneath both: Get-LoginInventory: the logins a migration has to recreate, by type and status. No permission…
🔧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…
🔧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…
🔧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…
🔧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 2 scripts fill the gap between them: Get-TempdbUsage shows exactly how full each…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning When Top CPU Doesn’t Explain “Why Is This Slow” The query usually runs fine and sometimes takes forever, or the server is slow and Top CPU Queries names nothing that explains it. A CPU ranking…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting 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 3 scripts give you the per-session detail underneath that number. Get-ActiveSessions…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Backup & Recovery Pages Already Recorded as Bad, and a Backup Check Before DBCC CHECKDB An 823 or 824 just landed in the error log, or DBCC CHECKDB is due and you want to know whether anything is already recorded against this server.…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. Who Can Do What, What’s Happening, and What’s Missing Security on an inherited SQL Server instance breaks down into four genuinely different questions, and a single “run a security scan” checklist tends to blur them together. Who has privileged access, right now? What’s…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Security Three Kinds of Infrastructure Most Servers Never Had in the First Place A schema change or a new login fails on an inherited server and nothing in your own code explains it, an auditor asks what this instance records, or a SQL…