SQL Server with Mr. Denny

Apr 28 2008   9:00AM GMT

Checking free disk space from T/SQL



Posted by: mrdenny
T/SQL, xp_fixeddrives, SQL

I’ve seen some very creative ways to see how much free disk space SQL Servers have.  Most make use of xp_cmdshell which some very complex dos commands or vbscripts.

However there is a much easier way.  Microsoft has included the system extended stored procedure xp_fixeddrives.  It returns the all the fixed drives and the amount of free space in megs.

Denny

Comment on this Post


You must be logged-in to post a comment. Log-in/Register