MDF (SQL) database file is over 88 GB and i have no idea why!

Or A picture Or A · Jan 27, 2010 · Viewed 7.4k times · Source

With some reason my sql database file exploded to become over 88 GB and i can't see a reason why. i run few scripts to search for large tables, found nothing to be too big. i also tried to run shrink database (which did nothing) and shrink files (which return an error).

has anyone has any idea what else i can do?

Thanks.

Answer

marc_s picture marc_s · Jan 27, 2010

First thing I'd check (if you've already checked the table and index sizes and still see a big difference) is the file properties.

In SQL Server Management Studio, go to the Object Explorer, right click on your database in question and do "Properties", and then go to the "Files" tab.

What files do you have? What are their settings, especially the "Autogrowth" settings?? If a data file gets close to filling up, SQL Server will expand it, in a way defined in those settings - if you define that 50GB should be added to the file, and the disk space is available, SQL Server will happily oblige and do so - even if it needs just a few hundred extra bytes.