Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

DBCC SHRINKFILE Does Not Work

$
0
0
All,

I have a database that has 30% unallocated space for the data file.  This file is taking up almost my entire disk space so I simply need to shrink it down; however when I attempt to run DBCC SHRINKFILE it does nothing.  I am trying to shrink the file past its initialized size but from my understanding DBCC SHRINKFILE will allow you to do this.  I am not trying to shrink less that what it needs to hold the data just enough to get me by a little longer until I can allocate some more SAN storage.  I am running SQL Server 2005 EE X64 CU 10.

I have run DBCC UPDATEUSAGE and then run sp_updatestats thinking the numbers may be off causing it not to shrink the file but this did not help.  I have tried making backups of the database with no luck.  I have also tried just releasing the unused space with no luck.  I don't receive any errors it just will not change the size of the data file. 

My only other thoughts are that I do have two tables that have indexes that take up ~12 GB worth of space.  Could it be possible if these indexes are terribly fragmented they are keeping the file from shrinking?

Thanks,

C

Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>