Category: Storage & Capacity
-
DBA Scripts: Get Database Sizes and Free Space
Get SQL Server Database Sizes and Free Space Database size checks are one of the first things I review when assessing a SQL Server environment. The goal is simple: understand where storage is being consumed, identify databases that need attention, and make sure there is enough capacity for normal growth. In production environments, database growth…
Written by
-
DBA Scripts: Get VLF Counts
VLFs – The Hidden Log Performance Problem Virtual Log File (VLF) count is one of those SQL Server health checks that is often overlooked. It rarely generates alerts, doesn’t usually slow down a single query, and most users never know it exists. Yet an excessive number of VLFs can quietly impact many transaction log operations,…
Written by
-
DBA Scripts: Get Compression Candidates
Where Compression Actually Pays Off Row and page compression trade CPU for storage and I/O, and that trade is worth making on some tables and not others. The biggest, least-frequently-updated tables are usually the best candidates: maximum space and I/O savings, minimal CPU cost relative to the table’s overall activity. A small, heavily-written table is…
Written by
-
DBA Scripts: Get Filegroup Space
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 while its PRIMARY filegroup, or a specific secondary filegroup an application actually writes to, is…
Written by
-
DBA Scripts: Get Database Growth Risk and Forecast
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 needs two different scripts. The first is a snapshot you can run right now, no…
Written by
-
DBA Scripts: Get Database Free Space Summary
Allocated vs Used, Split by Data and Log, Every Database, One Pass A write has just failed and the drive it lives on still shows free space. This script reports how much room is left inside the database files themselves for every online database on the instance, split into data and log, with the tightest…
Written by
-
DBA Scripts: Get TempDB Usage and File Balance
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 TempDB file is right now, broken down by user objects, internal objects, and version store.…
Written by
-
DBA Scripts: Get Disk Space on SQL Server
Run Get-DiskSpace when a SQL Server volume is filling and you have SQL access but no RDP. It reports free and used space on database-file volumes, fullest first. Why Disk Space Matters SQL Server does not degrade gracefully when a volume fills. A full data volume means autogrow fails and inserts start throwing errors. A…
Written by
- Tune a Slow Query With Copilot in SSMS
- xp_readerrorlog: Read the SQL Server Error Log with T-SQL
- Cannot Drop Database Because It Is Currently in Use (Error 3702)
- Could Not Drop Login Because the User Is Currently Logged In (Error 15434)
- Set a Maximum Database File Size in SQL Server (MAXSIZE)
- SQL Server Activity Monitor in SSMS (and the Performance Dashboard)
- Backups & Recovery (18)
- DBA Scripts (154)
- High Availability (HA) (13)
- Installation & Configuration (60)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (10)
- Performance Tuning (38)
- Security (Encryption & Permissions) (25)
- Storage & Capacity (18)
- T-SQL Fundamentals (17)
- Troubleshooting (108)
- Wait Types (236)