What is the difference of the sys.master_files and sys.database_files? I have about 20 databases in my instance but when I query the sys.master_files I do not receive any rows. Why? When I query sys.database_files I get the information about the database files concerning the current database.
What is the difference of the sys.master_files and sys.database_files? I have about 20 databases
Share
sys.master_files :
sys.database_files :
So,
SELECT * FROM sys.master_filesshould list the files for each database in the instance whereasSELECT * FROM sys.database_filesshould list the files for the specific database context.Testing this here (SQL 2K8), it works as per the above?
Update:
If you’re not seeing rows from sys.master_files, it could be a permissions issue as BOL states:
Whereas for sys.database_files just requires membership in the public role.