attachcontendb and orphaned site collections
I have 1 web app with 1 content DB, 1 site collection and multiple subsites. I need to make a copy of that web application on the same farm so I could test a few things on it without disturbing the original web application application.
I created a new web application and when I tried to attachcontentdb from a backup, I received the following error:
The attach operation cannot continue because another object in this farm already contains the same ID. Each object in a farm must have a unique ID. In order to
proceed with the attach operation you must assign a new ID to this database. To attach this database with a new ID, use the "stsadm.exe -o addcontentdb" operati
on with the -assignnewdatabaseid parameter. Note that if this new database and an existing database contain the same site collections, attaching this database w
ill likely result in orphaned site collections due to conflicts between the two databases.
So my question is, if I used -assignnewdatabaseid will it result in orphaned site collections?
Thanks
November 15th, 2010 11:46am
Hi JohnXO,
Please try to restore the DB instead of attach the content database follow these steps:
1 Back the content database
2 create a new content database and restore the content database to the new database.
3 Associate restored DB with the new Web Application.
4 Run ISSRESET.
If it
didn’t work,
I think the web application
need to be migrated
to another farm.Best regards. Emir
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 6:45am
Emir,
I followed the steps but still received the same message. I think you are right, one farm cannot host the same site collection even if in different content databases. I think the site collection GUID is retained even if I use the -assignnewdatabaseid switch.
November 17th, 2010 9:46am
From technet:
Tip:
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.
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 1:54pm
From technet:
Tip:
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.
November 17th, 2010 1:54pm