Friday, May 17, 2013

Where are the databasefiles on disk?


A fast way to see where the databasefiles is placed on disk is to use the sys.master_files. With this you can get a view over the database and where their files reside.

select d.name, m.name, m.type_desc, m.physical_name
from sys.master_files m
inner join sys.databases d
on (m.database_id = d.database_id)
order by m.name

No comments: