07 March,2012 by Tom Collins
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
SQL Database Status with sys.databases
SQL Server Database Status,monitoring and Restores
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |