October 5, 2011 at 5:47 pm
Hi,
In SQL Server 2008, in the following query, how can I obtain the filename beside the file_id?
SELECT i.file_id ,sample_ms ,num_of_reads ,num_of_bytes_read
FROM sys.dm_io_virtual_file_stats(DB_ID(N'MYDB'), NULL)
October 5, 2011 at 6:05 pm
run the same query, in MYDB, but join sys.dm_io_virtual_file_stats ((DB_ID(N'MYDB'), NULL) to sys.database_files on file_id
October 5, 2011 at 6:13 pm
you may also want to look at sys.master_files it is in the master database however it provides a more global over view for the data you are trying to get at (file ID)
October 5, 2011 at 6:16 pm
Thanks!
cheers buddy!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply