Wednesday, July 2, 2008

SharePoint Current Number of Sites 0 after SQL Restore of Content DB

I was planning to restore a content DB backup into a SharePoint box. So I’ve created the web application, removes the default content database and add the restored content DB into the web application. Once this is done, the value “Current Number of Sites” is showing up as 0.

Apparently, when adding a content DB into a web application, the SiteIDs (GUIDs) in the content DB are added into the [SharePoint_Config].[SiteMap] table. If a site with the same SiteID already exist in the SharePoint box, the add process will fail without much feedback from the Central Admin page. The logs from the 12 hive doesn’t give much indication either. The only clue you get is from the application event log. An inspection on the event log shows the following error:

Therefore, must take note that no two identical site can reside within the same SharePoint box. There might be possible to patch the SiteID for the restored content DB to another GUID value, provided you know where to patch J.

1 comment:

Mr. Tony said...

Thank you, it really works!