-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Hi there,
just realized there is a small errror in the view qpi.volumes, used_gb should be total_gb and total_gb should be used_gb while substracting available_bytes from total_bytes.
CREATE VIEW qpi.volumes
AS
SELECT volume_mount_point,
total_gb = CAST(MIN(total_bytes / 1024. / 1024 / 1024) AS NUMERIC(10,1)),
available_gb = CAST(MIN(available_bytes / 1024. / 1024 / 1024) AS NUMERIC(10,1)),
used_gb = CAST(MIN((total_bytes-available_bytes) / 1024. / 1024 / 1024) AS NUMERIC(10,1))
FROM sys.master_files AS f
CROSS APPLY sys.dm_os_volume_stats(f.database_id, f.file_id)
GROUP BY volume_mount_point;
GO
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels