December 3, 2018 at 3:19 am
Hello
Is there anyway to free up some more space on a mdf file without shrinking it?
Thanks
December 3, 2018 at 5:53 am
Funny you should bring this up...
I'm working on (but have not yet completed) a method to determine which index/heap the last page of an MDF file maps to, rebuilds that index (which will free that page), then wash, rinse, and repeat so that a shrink with TRUNCATE-only would do the trick without inverting any indexes. The big trick is knowing when to quit because any index over 128 extents (just 8 MB) will cause the old index to persist until a new organized copy of the index is committed. That could take you past the current end of the file and you'd suffer from possibly recursive expansion of the MDF.
And, yeah... it would have been real nice if MS thought of such a thing (Peter Norton disk organization method) when the wrote the shrink-file code. Seems like it would have taken about two extra steps.
Other than that, you need to "get lucky".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply