Wednesday, January 20, 2016

Attaching the same content database more than once to a SharePoint 2010 farm.

We can't attach the same content database (restored from backup with different DB name)
We need to run the below CMD from SharePoint application server to change the Database ID and attached to particular Web application.

Mount-SPContentDatabase -AssignNewDatabaseId "WSS_StagingContentDB_123" -WebApplication "http://site:84"

Bottom Line:

You cannot attach the same content database more than once to a farm, even on different Web applications. Each site collection in a content database has a GUID that is associated with it, which is registered in the configuration database.
Therefore, you cannot add the same site collection twice to the farm, even in separate Web applications. Although you can successfully attach the database in this situation, you will be unable to start the site collection.


If you need a duplicate copy of a site collection in the same farm, first attach the database that contains the site collection to a separate farm, and then use the Stsadm backup and restore operations to copy the site collection over to the other farm. The Stsadm backup and restore process creates a new GUID for the site collection.

No comments:

Post a Comment