Monday, May 24, 2010

SharePoint Content Database Detach Attach Tips

Recently I upgraded SharePoint 2007 farm from SP1 to SP2. I took the hybrid approach, i.e., I detached the content databases before the binary upgrade, then attached those content databases after the binary upgrade. All went well other than one issue and one interesting observation.

The issue: for all the content databases, we have custom value for "Site Level Warning" and "Maximum Number of Sites", after detach and attach, the custom values are gone and I had to create a simple console application to update those values. I could do this manually via central administration, but we have many content databases.

So don't forget to set those values if those values are customized.

The observation: In Central Administration > Application Management > Content databases, you can set the value for Site Level Warning and Maximum Number of Sites to the same value, even the Manage Content Database Settings page says in red on the top "The database capacity setting values must be greater than the number of existing sites in the database, and warning site count must be less than the maximum site count.". Very strange. Maybe just a bug in the UI.