Author: Peter Whyte
-
DBA Scripts: Get Active Sessions and Requests
🔧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 three scripts give you the per-session detail underneath that number. Get-ActiveSessions…
Written by
-
DBA Scripts: Get Suspect Pages and Integrity Checks
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Backup & Recovery 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…
Written by
-
DBA Scripts: Security
🔧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…
Written by
-
DBA Scripts: Get Audit Specifications, DDL Triggers, and Proxy Credentials
🔧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 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.…
Written by
-
DBA Scripts: Get Certificates, Keys, and TDE Status
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Security 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…
Written by
-
DBA Scripts: Get Login Security Audit
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Security 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…
Written by
-
DBA Scripts: Get Permissions and Role Membership
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Security Who Can Actually Do What, at Every Level Sysadmin Members answers the single highest-stakes question: who has unrestricted access. These four scripts answer everything underneath that: explicit object and schema grants inside a database, explicit server-level grants and denies on logins, database…
Written by
-
DBA Scripts: Get Top CPU Queries
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning Three Different Ways a Query Can Be the Problem “Which query is causing this” has more than one right answer, because a query can be expensive in different ways: it can burn CPU, it can…
Written by
-
DBA Scripts: Query and Performance Tuning
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting “The database is slow” almost never means the whole database, it means one query, one plan, one statistic that went stale at the wrong moment. Eight scripts on this site cover the full path from “something feels slow” to a…
Written by
-
Understanding SQL Server AG Latency (AAG Latency Explained)
As a production SQL Server DBA, one of the fastest health checks I run on an Always On Availability Group is a latency check. AG latency is the delay between a transaction committing on the primary replica and that same transaction being hardened and redone on a secondary replica. If the secondary is behind, it…
Written by
Start Here
- DBA Scripts: The Complete Guide
- Run a Full Health Check
- DBA Scripts & Tools
- SSMS: The Complete Guide
- SQL Server Errors: The Complete Guide
- Wait Types Library
The Pillars
Blog Categories
- Backups & Recovery (16)
- DBA Scripts (151)
- High Availability (HA) (12)
- Installation & Configuration (38)
- Maintenance (24)
- Migration & Upgrades (14)
- Monitoring (6)
- Performance Tuning (35)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (14)
- T-SQL Fundamentals (11)
- Troubleshooting (54)
- Wait Types (235)
Latest Posts
- SQL Server Login Migration: What Gets Silently Left Behind
- CREATE USER WITHOUT LOGIN vs Contained Database Users
- The sqldba MCP Server: Give Your AI Assistant a Verified SQL Server Reference
- Cannot Resolve the Collation Conflict (Error 468)
- Logical Consistency-Based I/O Error in SQL Server (Errors 823 and 824)
- Cannot Recover the Master Database (Error 3417) and What the Log Actually Says
Blog Tags
Access (4) Always On Availability Groups (4) Auditing (7) Backups (6) Blocking (4) Blocking Locking (6) Collectors (7) Database Backups & Recovery (8) Database Backups and Recovery (5) Database Maintenance (7) DBA Tools (24) Disk Space (5) Error Log (3) Extended Events (8) Features (6) High Availability (6) Indexes (7) Installation (7) Inventory (8) Maintenance (6) Migration (14) Monitoring (27) Performance (21) Performance Troubleshooting (9) PowerShell (4) Query Behaviour (5) Security (10) SQL Agent (5) SQL Scripts (17) SQL Server Administration (10) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (3) SQL Server Management Studio (SSMS) (6) SQL Server Monitoring (7) SQL Server Networking (9) SQL Server Security (7) Storage and Capacity (7) T-SQL (10) Temp DB (3) Tracing (7) Transaction Logs (4) Troubleshooting (24) Windows Server (4)