Author: Peter Whyte
-
How to Shrink SQL Server Database Files in Chunks
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity A data file that’s grown far past what the database actually needs, after a one-off bulk load, an archive cleanup, a migration that left behind a much bigger footprint than the data now occupies, eventually needs to come back down.…
Written by
-
DBA Scripts: Get Lock Escalation, Contention Analysis, and Blocking Chains with Plan
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Blocking & Locking Three Different Views of the Same Underlying Problem Blocking Chains shows what’s blocked right now. These three scripts go wider and deeper: Get-LockEscalationStats finds which tables have converted row/page locks into full table locks (a common,…
Written by
-
AM_INDBUILD_ALLOCATION and AM_SCHEMAMGR_UNSHARED_CACHE Wait Types in SQL Server
⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: IO_COMPLETION Wait TypeRelated pillar: Performance & Troubleshooting Two Access Methods (AM) waits share this page: AM_INDBUILD_ALLOCATION: a thread waiting for exclusive access to an extent during allocations while building or rebuilding indexes. Parallel index builds allocate space aggressively, and workers occasionally…
Written by
-
WAITFOR Wait Type in SQL Server
⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: SOS_SCHEDULER_YIELD Wait TypeRelated pillar: Performance & Troubleshooting WAITFOR is the most literal wait type in the DMV: it records sessions executing a WAITFOR DELAY or WAITFOR TIME statement. The duration is exactly what the T-SQL asked for. Nothing is contended and…
Written by
-
BACKUP Wait Type in SQL Server
⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: BACKUPIO and BACKUPBUFFER Wait TypesRelated pillar: Backup & Recovery BACKUP is recorded when a thread involved in backup processing waits to synchronise with the other threads of the same backup. Backups run as a multi-threaded pipeline (readers, writers, a coordinator), and…
Written by
-
BACKUPTHREAD Wait Type in SQL Server
⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: BACKUPIO and BACKUPBUFFER Wait TypesRelated pillar: Backup & Recovery BACKUPTHREAD is recorded when a thread involved in a backup or restore waits for other threads in the same operation to finish their part. Backups are multi-threaded pipelines, readers pulling pages, writers…
Written by
-
DBA Scripts: Get Trace Flags and Resource Governor Configuration
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Two Things a Previous DBA Might Have Set and Never Told You Trace flags and Resource Governor are both instance-wide behavior changes that don’t show up in sp_configure at a glance, don’t appear in the database, and can sit silently…
Written by
-
BAD_PAGE_PROCESS Wait Type in SQL Server
⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: PAGEIOLATCH_SH Wait TypeRelated pillar: Performance & Troubleshooting BAD_PAGE_PROCESS is recorded by the background suspect page logger, the process that records 823 and 824 I/O errors into msdb.dbo.suspect_pages, as it throttles itself to run no more than once every five seconds. You…
Written by
-
DBA Scripts: Get CPU Topology and OS Configuration Checks
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration What CPU and OS Settings Are Actually Doing to SQL Server OS and Hardware Info tells you what hardware exists. These two scripts go one level deeper: how SQL Server is actually scheduling work across that hardware, and whether a…
Written by
-
BROKER_TASK_STOP Wait Type in SQL Server
⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: SOS_SCHEDULER_YIELD Wait TypeRelated pillar: Performance & Troubleshooting BROKER_TASK_STOP is recorded when a Service Broker internal task handler waits (up to ten seconds at a time) to shut itself down because there are no Broker tasks, message transmission, receipt, or other asynchronous…
Written by
- DBA Scripts: Get Log Shipping Status
- SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
- View the Definition of a Stored Procedure in SQL Server
- TempDB Is Full or Still Growing: Find What Is Using It, Right Now
- SQL Server Service Will Not Start: Error 17113, 17058, 1067 and Where the Real Reason Is
- How to Move TempDB Files in SQL Server
- Backups & Recovery (17)
- DBA Scripts (152)
- High Availability (HA) (13)
- Installation & Configuration (49)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (16)
- T-SQL Fundamentals (15)
- Troubleshooting (94)
- Wait Types (235)