Category: Storage and Capacity Management
-
Script: Transaction Log Size and Usage by Database
This script returns transaction log size and usage information for all databases on the instance. It shows total log size, used log space, percentage used, and recovery model. This is commonly used during log growth incidents, backup troubleshooting, or when validating log management across an environment. The Script Example Output The result set shows one…
-
Script: Check Disk Space on SQL Server
This script returns disk space information for volumes that host SQL Server database data or log files. It shows total size, available free space, and percentage free space per drive or mount point. This is commonly used during storage pressure incidents, failed backups, restore troubleshooting, or proactive capacity reviews. The Script Example Output The result…
-
Script: Get Database Sizes and Free Space
This script returns file-level size and free space information for all databases on a SQL Server instance. It shows how much space is allocated, how much is used, and how much free space remains inside each data and log file. This is a go-to check when reviewing storage usage, investigating unexpected growth, or validating capacity…
Blog Categories
Latest Posts
- Troubleshooting Database Mirroring Issues in SQL Server
- Get Current Date & Time in SQL Server
- Creating SQL Logins on an Availability Group (AG) Environment
- Grant VIEW SERVER STATE in SQL Server
- How to Get the SQL Server IP Address
- SQL Server Error Severities Explained
Blog Tags
Always On Availability Groups (4) Database Backups & Recovery (10) Database Maintenance (7) DBA Tools (29) Performance Troubleshooting (9) PowerShell (4) Query Behaviour (4) Schema Changes (1) SQL Agent (1) SQL Interview Questions (1) SQL Scripts (25) SQL Server Administration (9) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (4) SQL Server Management Studio (SSMS) (7) SQL Server Monitoring (10) SQL Server Networking (9) SQL Server Replication (1) SQL Server Security (8) SQL Server Versions (2) Storage and Capacity (14) T-SQL (9) Transaction Logs (8) Troubleshooting (14) Windows Server (4)