We have a multitude of databases whose files are stored on their own individual mount points in a drive
(ex. Z:\dbname_db\dbname_db.mdf and Z:\dbname_log\dbname_log.ldf)
What I’m looking for is a way to find the available free space of the mount point.
EXEC xp_cmdshell 'fsutil volume diskfree Z:\dbname_db'
But the service isn’t running as administrator so fsutil will not work.
How would I go about doing this, is a stored procedure the most efficient way to do it?
xp_fixeddrives will not display information for mount points, only normal fixed drives.
The following link has a CLR procedure that will use a Performance Counter to return the capacity and free space of a mount point.
http://weblogs.sqlteam.com/tarad/archive/2007/12/18/60435.aspx