SQL Server - Database with strange storage space

1

I have a strange problem with one SQL server database: The database takes 180GBs on disk, with no space available;

database properties

while the only table it contains should use only sth like 25GBs:

EDIT: database in in recovery mode:simple

table properties

If I open the "shrink file" window, it reports a 99% full data file, and the log file with 170 GB allocated with 15 GB free (and it is ok, if it increments by 10%)

How can I reduce the size of the database? where all the space is??

AndreaCi

Posted 2013-11-27T17:37:53.487

Reputation: 1 310

1Have you tried backing up the database using SQL Server Management Studio? That should truncate the logs back into the database, if you are using a simple recovery model. – Mat Carlson – 2013-11-27T18:25:27.017

yes, forgot to mention: recovery model is simple, I tried to do a backup and it failed (not enough disk space) – AndreaCi – 2013-11-28T13:18:33.577

Can you remove some files from your full drive? You can also add an external (or another) hard drive to the computer, create a new volume, and mount it to a specific location. If you do that when the SQL server service is down, you should be able to move all files to the external drive, then remount the drive in the empty SQL directory (mount it first as a drive letter, then remount it as a NTFS location). – Mat Carlson – 2013-11-28T14:00:42.650

You may also be able to run "Shrink Database" in SQL Management Studio, although I suspect you'll have the same error due to no space. – Mat Carlson – 2013-11-28T14:01:52.157

No answers