MSSQL Free Space in Databases files
To get a list of the databases files, and the current disk size in MB, and the Free Space in MB in each fil, you can use this commands
1 2 3 4 5 6 7 |
USE [DATABASE_NAME] SELECT DB_NAME() AS DbName, name AS FileName, size/128.0 AS CurrentSizeMB, size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS INT)/128.0 AS FreeSpaceMB FROM sys.database_files; |
If you need a...
Sidste kommentar