As we know xp_fixeddrives can only be use to retrieve normal fixed drives space information. It cannot be used to retrieve information about the mount points. Mount points are now supported in SQL Server 2005. We implemented them on our production clusters and therefore needed a way to monitor them.

I have written and implemented the following CLR (.NET Framework) code to get the disk and mount point space information. In this blog post I will show you the code i.e. written in VB.NET and the implementation of this custom CLR procedure.

Open Microsoft Visual Studio and create SQL Stored Procedure project. Choose VB.NET as a code language. Copy the VB.NET code below and then save the file and follow the instructions below to compile the code.