I have a SQL Server (2005 Developer Edition) database that has grown too large for it's drive.
Yesterday evening I dropped a large table that was no longer needed and last night I set up a maintenance plan to shrink the database with 25% free space to remain after shrink, and to rebuild the indexes.
The job ran successfully, however the size of the .mdf file was only reduced by about 1.5GB even though the sp_spaceused
results indicate that most of the database is unallocated space.
database_name,database_size,unallocated space
redacted,28717.69 MB,28349.03 MB
I was expecting a far larger decrease in the size of the database.
Did I improperly configure the maintenance plan? Am I misunderstanding what happens when a database is shrunk? Both?
text
. Based on your comment, I'd guess that's the issue. Do you know of a resource I can check out for more information about this kind of space not being readily recovered?