Search code examples
sql-serverreportdisk

Queries to generate a Disk Usage report details


With MSSMS I'm using the Disk Usage report to track the space usage (space usage in MB, and data/log details in %). This is a manual one shot process.

I would like to store all the details in a dedicated table (scheduled every hours) to have a better vision of my config.

After googling I'm not able to find such query, but pretty sure that it is available out of the box.

The query must run on SQL 2008 Express and SQL 2008 R2.

Anu clue?


Solution

  • You can do that:

    • Open SQL Server Profiler and start a new trace on your database
    • Go to SMSS and open the report you need
    • Once you see it on screen, go back to Profiler and pause the trace
    • Look at the queries that have been executed and figure out which one is usefull

    This solution works with any report.