ahmed_b72
Ten Centuries
Points: 1251
More actions
October 5, 2011 at 5:47 pm
#246084
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)
mendesm
Points: 1074
October 5, 2011 at 6:05 pm
#1391020
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
SQL Stud
SSC Eights!
Points: 987
October 5, 2011 at 6:13 pm
#1391021
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
#1391022
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