Hi All,
I want to find out IO latency for all files. For that i would like to automate the below script taking dbid and fileid as parameter for sys.dm_io_virtual_file_stats(null,null) function. How to do that?
I need help in merging the 2 queries and get he ouput for all files in my instance.
select db_name(database_id) dbname,
io_stall_read_ms/num_of_reads as 'Disk Read Transfer/ms',
io_stall_write_ms/num_of_writes as 'Disk Write Transfer/ms'
from sys.dm_io_virtual_file_stats(null,null)
select dbid,fileid,name,filename from master..sysaltfiles
Thanks in Advance.