Blog Post

SQL Server – sys.master_files and list all database files

,

Use the system view “sys.master_files”  for a single view of databases and database files.

Instead of using sys.sysfiles  joing to sys.sysdatabases use the sys.master_files

 

select DB_NAME(database_id),mf.name as [file_name],physical_name
 FROM sys.master_files as mf

 

See Also

SQL Database Status with sys.databases

SQL Server Database Status,monitoring and Restores

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating