magritton
7/3/2015 - 12:38 PM

SQL DMV that get the size of the database files

SQL DMV that get the size of the database files

SELECT name ,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB
FROM sys.database_files;