SELECT DISTINCT
CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,
volume_mount_point [Disk],
file_system_type [File System],
logical_volume_name as [Logical Drive Name],
CONVERT(DECIMAL(18,2),total_bytes/1073741824.0) AS [Total Size in GB], ---1GB = 1073741824 bytes
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 %]
FROM sys.master_files
CROSS APPLY sys.dm_os_volume_stats(database_id, file_id)
Friday, 3 September 2021
Getting free space information in SQL Server VM
We can get freespace information in a SQL Server VM using below TSQL command.
Subscribe to:
Post Comments (Atom)
How to Handle SSIS Database movement from one environment to another
Below are the steps to follow the movement of SSISDB from one environment to another: -- opening the existing Database master key in S...
-
We are using Azure Data Factory to load data from Azure storage blobs to SQL Server on-premises. During data loading, we faced SQL Error: ...
-
Hello World, Through this blog, I am going to ruminate over lots of technical stuff around databases. Hoping to provide quality conten...
-
Below are the steps to follow the movement of SSISDB from one environment to another: -- opening the existing Database master key in S...
No comments:
Post a Comment