Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE master
- GO
- SELECT
- CAST(db_name(a.database_id) AS VARCHAR) AS 'Database',
- b.physical_name AS 'File',
- a.size_on_disk_bytes AS 'Size',
- a.io_stall_read_ms / a.num_of_reads AS 'Avg. Read Delay',
- a.io_stall_write_ms / a.num_of_writes AS 'Avg. Write Delay'
- FROM
- sys.dm_io_virtual_file_stats(NULL, NULL) a
- INNER JOIN sys.master_files b
- ON
- a.database_id = b.database_id
- AND a.file_id = b.file_id
- WHERE
- num_of_writes > 0
- AND num_of_reads > 0
- ORDER BY
- 'Database',
- a.io_stall DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement