Measure Disk I/O Performance per Database File
Jul 3, 2026 / · 8 min read · sql server sys.dm_io_virtual_file_stats sys.master_files disk io io stall disk latency performance database files dmv monitoring scripts ·I/O latency is where disk bottlenecks hide. SQL Server accumulates every millisecond of file-level read and write wait in sys.dm_io_virtual_file_stats — one row per database file, reset at each service restart. Joining that DMV to sys.master_files replaces raw file IDs with physical paths and file types, and dividing …
Read MoreSQL Server Database File Space Usage Report
May 17, 2026 / · 8 min read · sql server sys.master_files sys.dm_os_volume_stats database files disk space monitoring sql scripts database administration fileproperty sys.database_files sys.databases ·Running out of space inside a data or log file halts SQL Server transactions immediately — and discovering that a volume is full only after an outage is too late. This script queries sys.master_files and sys.dm_os_volume_stats across every online database on the instance to report each file's allocated size, space …
Read MoreSQL Server Database Size Report for All Databases
Apr 2, 2026 / · 6 min read · sql server monitoring sql scripts sys.master_files sys.databases database administration capacity planning storage reporting maintenance scripts ·Report Database Size in MB and GB for All SQL Server Databases This script queries sys.master_files and sys.databases to report the total allocated size in megabytes and gigabytes for every user database on the SQL Server instance, sorted by largest database first. Purpose and Overview Knowing how large each database …
Read More