When working with limited disk space database server like my test server at home, I make sure to check the machine's disk space now and then. To get the free disk space for all physical drives on a machine using T-SQL, we can make use of the undocumented extended stored procedure called xp_fixeddrives. Here is a sample T-SQL code to call xp_fixeddrives:
USE master EXEC xp_fixeddrives
If executed, the code above will produce a list that contains the driver letter and its available disk space.
0 comments:
Post a Comment