August 5, 2011 at 3:40 pm
Can anyone give me a clue to why a database does not stay shrunk? I shrink the database, run a full backup and it stays shrunk until the next evening. I'm not losing any data or anything, but why/how is it being resized to the original size? (Full backups' are run in the evening).
This database is just kept for historical purposes and no new content is added and I just want to reclaim the space that's never going to be used. Please advise.
August 5, 2011 at 3:43 pm
Index rebuilds?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 5, 2011 at 4:22 pm
automated alter database command?
---------------------------------------------------------------------
August 5, 2011 at 4:33 pm
Well...I shrunk the database, then rebuilt the index and what do you know? It returned to the "original" size...Is there an explanation for this?
Thank you.
August 5, 2011 at 4:37 pm
shrinking causes severe fragmentation. To fix fragmentation, SQL needs free space in the database.
http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 5, 2011 at 5:04 pm
Thank you..I just thought it was bit conicidental that the file is resized to almost exactly the same size as the original.
August 6, 2011 at 1:11 pm
shaka.hi (8/5/2011)
Thank you..I just thought it was bit conicidental that the file is resized to almost exactly the same size as the original.
Check the autogrowth setting - the space you are "saving" is probably at or near the same size as your autogrowth, or a factor/fraction of that autogrowth setting.
How much space are you trying to save with this operation? It doesn't sound like anything significant and as such is probably just a waste of time.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply