Category: Storage & Capacity
-
How to Move TempDB Files in SQL Server
TempDB on the C: drive is a problem waiting for a busy day. It can grow very large, very quickly, sometimes within minutes under the right workload, and when it fills the OS drive it takes the whole server down with it. Moving the tempdb files to their own drive is a standard best practice,…
Written by
-
Add a Filegroup to a SQL Server Database
ADD FILEGROUP then ADD FILE, and the trap in between: a filegroup with no files will accept a CREATE TABLE and only fail at the first INSERT with Msg 622. Placing objects, changing the default, and removing one again.
Written by
-
DBA Scripts: Get Autogrowth History
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity SQL Server autogrowth is one of those settings that is often ignored until it becomes a production problem. A database file growing during normal business hours is usually a sign that SQL Server is reacting to a capacity issue. The…
Written by
-
DBA Scripts: Get Transaction Log Size and Usage
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity Understanding Transaction Log Size Usage Keeping an eye on transaction log usage is one of the simplest ways to prevent unexpected database outages. When a transaction log fills, SQL Server cannot continue writing transactions, backups begin failing, applications stop processing…
Written by
-
DBA Scripts: Get Log Reuse Waits
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity The One Question That Actually Matters A transaction log that won’t truncate and keeps growing, or a log backup job that suddenly can’t keep up, always comes back to the same underlying question: what is this database’s log actually waiting…
Written by
-
DBA Scripts: Get TempDB Configuration
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity TempDB is shared by every database on the instance, and it’s usually the first thing to show contention under load, long before any user database does. Unlike a user database’s files, TempDB’s default configuration out of the box (a single…
Written by
-
DBA Scripts: Get Table Sizes
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity Walk onto a new SQL Server instance and the first honest question is usually “where’s all the space going.” Not at the database level, sys.master_files answers that in seconds, but at the table level, inside a database that’s grown for…
Written by
-
DBA Scripts: Get SQL Server Database File Details
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity Understanding SQL Server Database File Layout SQL Server database files are one of those areas where small configuration issues can become large operational problems. A database may be running perfectly today, but poor file placement, incorrect growth settings, or uncontrolled…
Written by
-
DBA Scripts: Get Database Sizes and Free Space
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity 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,…
Written by
-
DBA Scripts: Get VLF Counts
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity 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…
Written by
- 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
- RAND() vs NEWID() in SQL Server
- Backups & Recovery (17)
- DBA Scripts (151)
- High Availability (HA) (12)
- 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)