Calling All SQL DBAs - I need help, pronto!

Soldato
Joined
11 Feb 2004
Posts
4,532
Location
Surrey, UK
Summary

- SQL database at 60GB with no disk space left.

- The related application had written 6 million records which are not needed so we used some T-SQL to delete them out which should have free up 40+ GB of disk space (each record contains large text fields).

- SQL is not willing to give up the disk space. Even running sp_spaceused suggests there's only 200MB free so I'm assuming the shrinkdatabase command will be ineffective.

As said - we're out of disk space and this is a production environment! Your help will be very much appreciated.
 
Thanks for the response platypus. I looked into shrinking the DB but since SQL thinks the 60GB has been allocated (as determined using sp_spaceused), I didn't think it would do anything.

I've not tried any of those console commands either but I am about to. I'll run the code you provided first. I've just been told there's 196KB free on the 65GB volume. So running anything is going to be difficult if not impossible. Guess we could detach the DB and move it to another volume while maintenance takes place.
 
Thanks, sounds interesting. The Recovery Model is set to SIMPLE for the DB but I did notice the log file growing while deleting the records - only to a certain amount, approx. 1.5GB. At this point in time there was 5GB free.

platypus - I used a regular delete.. from.. while.. it did include a join. When I run a select statement using the criteria I deleted with - zero records are returned.

After each delete, I did get a message saying n number of records affected.
 
Back
Top Bottom