Find storage including mount points Sql and windows utility

  • Comments posted to this topic are about the item Find storage including mount points Sql and windows utility

  • This script didn't work for me. It worked on a server without MountPoints but not on a server with.

  • Personally i prefer to use WMI to get the volume info, it works for mounted and non mounted volumes so it's completely generic

    Roy Moore (2/16/2012)


    This script didn't work for me. It worked on a server without MountPoints but not on a server with.

    I use the following as a CMDEXEC job step, it works for all volumes on the server

    wmic volume get capacity, "free space", name

    I then suck the resulting data into SQL Server and process it which is then used to drive an SSRS report detailing database size info. You could also insert this data into a history table and build up stats over time

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • That is exacly what we do! Just thought this might be a cleaner way (i.e. all in one SP).

  • Starting in SQL server 2008 R2 there is a dynamic management function called sys.dm_os_volume_stats which pulls mount point info per database\database file.

    I still prefer WMI though 😉

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply