Sunday, 20 April 2008

Instructions on restoring a content database to a new farm.

Over the past week I've been working on a system where I've had to restore a very large content database from one farm to another. STSADM kept failing. The easiest way was to do a SQL backup of the database and restore it on the new farm's SQL server. Once we did that, through central admin we created a new web application, removed the content database associated with it from within central admin and added the restored content database.

Please note, you might sometimes see that once you attach it, it comes up saying sites as 0. To fix this, open up your restored database and configuration database in SQL Server. Then find the sites table in the restored database and located the ID of the site. Now open up the configuration database and find the SiteMap table. Located the row with the same site ID and then delete it. You should now be able to attach the restored database without issue.

Let me know if you have any problems with this.

Fadi

2 comments:

Anonymous said...

Can you please clarify: "...Then find the sites table in the restored database and located the ID of the site. Now open up the configuration database and find the SiteMap table. Located the row with the same site ID and then delete it."

In the tables of the restored database, do I go to dbo.Sites and then the Id column, or am I looking for Sites_Id in the Statistics folder? What does the ID of the site look like? Will it be in GUID form, just a number, or something else?

Thanks in advance!!

Fadi Noja said...

Hi.

Its a GUID and its located in the dbo.Sites table.