Get Disk Database Mount Points:
SELECT DISTINCT @@ServerName [Server], SUBSTRING(volume_mount_point,1,3) [Disk], file_system_type [File System Type], CONVERT(DECIMAL(18,2),total_bytes/1073741824.0) AS [Total Size in GB], CONVERT(DECIMAL(18,2),available_bytes/1073741824.0) AS [Available Size in GB], CAST(CAST(available_bytes AS FLOAT)/ CAST(total_bytes AS FLOAT) AS DECIMAL(18,2)) * 100 AS [Space Free %], GETDATE() [DateTmeStamp] FROM sys.master_files CROSS APPLY sys.dm_os_volume_stats(database_id, file_id)
|
|
|
|
|