Shrink database sql server 2005 mdf
I discovered that there were certain tables in the database database that were getting loaded again and again, where in actuality they should have had database a delete and reload each run.
I even tried increasing by 500MB, then shrinking in 100MB increments.
I am frankly at a loss of other things to try.
Thanks Much, status, solved, priority, medium, security.Kristen Test 22859 Posts Posted - : 17:29:30 I think you've misunderstood that bit MVJ as earlier on the O/P said " I had already rebuilt the indexes with their original fill factor, then I did it again with 100 fill factor.Subscribe to my blog, kristen, test 22859 Posts, posted - : 06:34:53.In that case, the user had truncated a table that contained LOB.FileSizeMB shrink UsedSpaceMB UnusedSpaceMB GrowthPct GrowthMB DBFileName 158201.88 109675.44 48493.44 null 1 database GE_Release_dat 691.94.58 653.36 10 null GE_Release_log codo ergo SUM cottonchopper Starting Member 8 Posts Posted - : 17:27:49 I was just playing around database trying to get the database to respond to a shrink.But the worrying thing is that I don't actually know when I really will start running into trouble.When I first started, the shrinkfile tasks would take 4 hours to perform, now they are completing in less than a minute with no errors.The log file is just over.I have tried dbcc shrinkfile(dbfilename,110000).We've got lots of great SQL Server experts to answer whatever question you can come up with.It's.8GB in size.My backup file.bak appropriately shrunk to a 150 gig.bak.Currently the size on disk server is 154.But what is working is your approach where you shrink by blocks of 100MB. I'm planning to move from sql shrink 2005 standard edition to sql 2008 r2 express edition.
The database grew to 168256, but the shrink task was able to take it back to 158201 but no smaller.
And restore only 6 gb server which will create the 6 GB (approx) mdf file in result of that.
After restoring the database, we removed a lot of the older data games since it wasn't needed for testing purposes.Not quite the same thing, but david the closest I could find.So I shrink in small increments and add 1MB after each shrink to ensure I continue making progress.Solution to that is to Reindex - but that will copy the indexes to the end of the file into clear-space which will re-grow the file.I have rebuilt every index in the database and even tried adding a new file then emptying the original file to get it to finally release the space.We don't anticipate the test database ever growing over at most 75GB so would like to reclaim the 50GB that is lost shrink now.Sure, portable that amount of elbow-room is needed in the real world, but this is a Production database that has been restored to DEV, irrelevant data removed, and in our shop too those sort of databases that are on the DEV server "just in case".A good way to start would be to reindex with 80 fill factor, and look at the space used again.Is the free space in the Database file (MDF) or the TLog file (LDF)?Also, the transaction page at the end of the Log may contain some "open" transactions, adding more (as Tara explains) will cause it to fill that page, then the next page it will use is at the start of file (which was backed up earlier).(Mental note: Don't use a fill factor of 10 to rebuild all the indexes) Thank you to everyone who is helping in anyway.Shrink DB File by portable Increment to Target Free Space p?topic_ID80355 codo ergo SUM cottonchopper Starting Member 8 Posts Posted - : 18:14:15 I actually already found this script on the site.MDF file and, log file, check the path!Public, views 404, seTech, analystAsked. Anaylor01 Starting Member 28 Posts Posted - : 12:30:01 Did you ever get this resolved?
It does however seem that any new data been written to the db is being plugged into the holes as my size is not growing that much.
Use MyDatabase - Show Size, Space Used, Unused direct Space, Growth Percent or GrowthMB, and Name of all database files select FileSizeMB UsedSpaceMB me SpaceUsed 128.,2), UnusedSpaceMB me SpaceUsed 128.,2), GrowthPct case when atus 0x then owth else null end, GrowthMB convert(int, round(case when atus.