SQL Server – Resolving MDF File Size Discrepancies

sql server

In a nutshell, my server is running out of free hard drive space so I ran the script found here to get an idea of tables I could possibly delete old data from:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=10932
but when I got the results it seems that deleting old data doesn't seem to be my solution. I have a feeling there is something else I should be aware of here…

results from sp_spaceused

database_name   database_size   unallocated space
prod            993333.19 MB    94327.32 MB


reserved        data         index_size unused
834819768 KB    833565632 KB 1065480 KB 188656 KB

The results of my "find big tables" script:

reserved_KB     data_KB     index_size_KB   unused_KB
27,257,368      26,126,568  1,003,184       127,616

Best Answer

A simple way to view the tables using the most space in your database is to run the canned Disk Usage by Top Tables report that is available through SSMS. Right click on the database in question, select Reports, and then select that report.