views:

30

answers:

1

We recently moved the value of a column from an existing table to a new table so that it could reside on a separate disk.

The preexisting column still remains but has been set to null as some historical applications may still reference this column when writing data.

The table now has 10GB unused space that we can not reclaim even after rebuilding the Clustered index and also running DBCC SHRINKDATABASE and SHRINKFILE.

How can we reclaim this 10GB of unused space in this table as the table in it's new form is not expected to grow by another 10GB in the next year+ however other tables in the database will continue to grow and we wish to return this 10GB to the general database pool.

I will repeat, how can we reclaim this 10GB of unused space in a specific table (given the table is not empty)?

+1  A: 

Have you tried importing the table into a new table? This would be the easiest way to check if there is available free space. If you don't want to grow this DB (since it might grow by another 10GB), you could create a temp DB and import there so you're starting with a empty DB of minimal size. Also, if you have full logging enabled on the DB you might want to do a FULL Backup before trying the SHRINKDATABASE/SHRINKFILE.

Zachary
Yeah, that's pretty much what we've decided to go with, we just have to watch out for any FK constraints and similar.
Seph