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

SQL 2000 - unable to shrink file

$
0
0

I have an MDF file on a SQL 2000 SP4 server that simply will not shrink. Its 29g in size. SSMS (yes I'm using SSMS not EM to look at things) shows the file can be shrunk by 79% to 6g. Every time I try to shrink it though, nothing happens. 

Originally the file was 99% full but by examining several tables that contained ntext columns and KB 324432 I determined I was hitting a bug, and probably 2/3 of the space in the database was being wasted. sp_spaceused 'objname' on a couple of objects confirmed an enormous amount of unused space.

Here's the bug - http://support.microsoft.com/default.aspx?scid=kb;en-us;324432 

The database had only one data file and one log file. I added a data file to the primary file group and ran DBCC SHRINKFILE(1,EMPTYFILE). It emptiedmost of the data out of the original file, but not all of it. Now the original file is 79% free but still wont shrink, plus I've got another 6g file to deal with now! (The point of this exercise was to free up space on the database drive, not make things worse!)

How can I get that original file completely emptied out and shrunk down as close to 0 as possible?

Oh yeah, here's one other strange observation. Normally when you run DBCC SHRINKFILE you get a result set back showing the current size of the file. When I run it on file# 1, I get no results tab. Just a message tab saying that dbcc completed. On any other file that I  shrink,  I get a results tab.


Chuck



Viewing all articles
Browse latest Browse all 15694

Trending Articles



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