Viewing 2 posts - 1 through 2 (of 2 total)
Hello Perry,
I want to fetch all these below mentioned columns, and we have versions from sql server 2008 to sql server 2016.
Database Name
Type
File Name
File Group Name
File_Location
FileSize_MB
UsedSpace_MB
FreeSpace_MB
FreeSpace %
Auto Growth
volume_mount_point
Total Volume Size_...
September 6, 2020 at 9:58 am
DECLARE @ServerVersion varchar(100)
SET @ServerVersion = CONVERT(varchar,SERVERPROPERTY('productversion'))
SET @ServerVersion = LEFT(@ServerVersion, CHARINDEX('.',@ServerVersion, 4)-1)
--PRINT @ServerVersion
DECLARE @command nvarchar(2000)
IF OBJECT_ID('tempdb..#FileData','U') IS NOT NULL
BEGIN
PRINT 'Dropping #FileData'
DROP TABLE tempdb..#FileData
END
CREATE TABLE tempdb..#FileData
(
[CurrentHost] varchar(250) COLLATE Latin1_General_CI_AS NULL,
[ClusterNodes] varchar(250) COLLATE...
September 4, 2020 at 11:37 pm
Viewing 2 posts - 1 through 2 (of 2 total)