Search

Wednesday, April 10, 2013

Ensure your Hard Drives Don't Run out of Free Space

DECLARE
@MinSpace int =1024 --less than 1GB

DECLARE
@Drives TABLE (

[drive] CHAR(1) NOT NULL PRIMARY KEY CLUSTERED,

[MBfree] VARCHAR(10) NOT NULL )

INSERT
INTO @Drives EXEC xp_fixeddrives

SELECT
* FROM @Drives

WHERE
MBfree < @MinSpace

GO

No comments:

Post a Comment