tags:

views:

205

answers:

2

hi,

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.

+1  A: 

The MDF (data file) or the LDF (log file)?

If you're running in the Full Recovery Model, then your log file may be growing and growing, until you back it up (at which point it will empty it out).

Otherwise, you could try looking for what's taking the space, with:

select *
from sys.allocation_units;

And bear in mind that you could have empty space in your database files. Your 'Shrink Files' dialog would've shown you the percentage free space.

Rob Farley
+1  A: 

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.

marc_s
i have data and log file. the data file size is set to 8966 mb and the log is set to 47. i have no idea how those values were changed.
Or A
And what are the Autogrowth settings on those??
marc_s