none
Best process to shrink db files RRS feed

  • Question

  • Hello All,

    What is the best process to shrink db files (not log files). Is there a calculation that tells us to what size to shrink? Links to documents will of great help.

    Thanks

    Monday, May 6, 2019 7:08 PM

Answers

  • Best pratices is to not shrink a database file, becauses index fragementation and so Performance issues.

    https://www.brentozar.com/archive/2009/08/stop-shrinking-your-database-files-seriously-now/


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by LisaKruger Wednesday, May 8, 2019 3:05 PM
    Tuesday, May 7, 2019 6:16 AM
  • Hello All,

    What is the best process to shrink db files (not log files). Is there a calculation that tells us to what size to shrink? Links to documents will of great help.

    Thanks

    The only best process is avoid data file shrink as much as possible that is really an evil operation. The only time data file shrink is justified when you have truncated huge tables and there is lot of free space which you need or when disk is running out of space. In all case shrink in small chunks and look at fragmentation level

    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP

    • Marked as answer by LisaKruger Wednesday, May 8, 2019 3:05 PM
    Tuesday, May 7, 2019 7:12 AM

All replies

  • Best pratices is to not shrink a database file, becauses index fragementation and so Performance issues.

    https://www.brentozar.com/archive/2009/08/stop-shrinking-your-database-files-seriously-now/


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by LisaKruger Wednesday, May 8, 2019 3:05 PM
    Tuesday, May 7, 2019 6:16 AM
  • Hello All,

    What is the best process to shrink db files (not log files). Is there a calculation that tells us to what size to shrink? Links to documents will of great help.

    Thanks

    The only best process is avoid data file shrink as much as possible that is really an evil operation. The only time data file shrink is justified when you have truncated huge tables and there is lot of free space which you need or when disk is running out of space. In all case shrink in small chunks and look at fragmentation level

    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP

    • Marked as answer by LisaKruger Wednesday, May 8, 2019 3:05 PM
    Tuesday, May 7, 2019 7:12 AM
  • Thanks Olaf and Shanky  i didnt end up shrinking the files.

    Wednesday, May 8, 2019 3:06 PM