locked
SharePoint 2007 content database shrink RRS feed

  • Question

  • I have SharePoint 2007 content database size of 270 GB out of which 80 GB is unused. Can I shrink the database? Is it recommended from Microsoft. 

    Please remember to mark the replies as answers or vote as helpful if they help.

    Sunday, November 30, 2014 4:24 AM

Answers

  • i have done this operation when i am sure that there are much of content has been permanently remove from environment and these are not been used later.

    Please make sure when you do this operation then you should perform the indexes in that database are fragmented. Use ALTER INDEX… REORGANIZE to address the fragmentation, consult with your DBA team as well.



    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful

    Thanks, ShankarSingh(MCP)

    Sunday, November 30, 2014 6:31 AM
  • Take Full SQL DBA backup before this operation

    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful

    Thanks, ShankarSingh(MCP)

    Sunday, November 30, 2014 6:31 AM

All replies

  • Hi Rana,

    it is not recommended to perform frequent .mdf file shrink frequently/automatically, you can surely perform .ldf file shrink.

    • Do not auto-shrink databases or configure a maintenance plan that programmatically shrinks your databases.

    • Shrink a database only when users or administrators remove 50% or more of the content and you do not expect to reuse the unused space.

    • Shrink only content databases. Users and administrators do not delete enough data from the configuration database, Central Administration content database, and various service application databases to contain significant free space.

    • Shrinking databases is an extremely resource-intensive operation. Therefore, if you absolutely must shrink a database, carefully consider when you schedule the shrink operation.

    • After you shrink a database, the indexes in that database are fragmented. Use ALTER INDEX… REORGANIZE to address the fragmentation. If you are not configured to allow instant file initialization, shrink the database to a target size that accommodates the size required for the near-term growth that you expect. For more information, see Database File Initialization.

    Please find below technet article it is for SP 2010 , but valid for SP 2007 :

    Database maintenance for SharePoint 2010 Products


    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful

    Thanks, ShankarSingh(MCP)

    Sunday, November 30, 2014 5:34 AM
  • Thanks for your response. I will do this operation one time. Do you have any practical/project exp on this

    Please remember to mark the replies as answers or vote as helpful if they help.

    Sunday, November 30, 2014 5:46 AM
  • i have done this operation when i am sure that there are much of content has been permanently remove from environment and these are not been used later.

    Please make sure when you do this operation then you should perform the indexes in that database are fragmented. Use ALTER INDEX… REORGANIZE to address the fragmentation, consult with your DBA team as well.



    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful

    Thanks, ShankarSingh(MCP)

    Sunday, November 30, 2014 6:31 AM
  • Take Full SQL DBA backup before this operation

    If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful

    Thanks, ShankarSingh(MCP)

    Sunday, November 30, 2014 6:31 AM