I want to create a debugging web application and another one for UAT.

The two applications should use identical content databases.

I made a backup from our live content database and did a restore in SQL and then used the management shell to mount the content database for the debugging web application.

Now I want to restore the same backed up content database into another database for the UAT environment and mount that content database for the UAT web application.

I got to restore the content database again with a different name as the debugging one, but when I try to mount it for UAT I get an error that exclaims :

The attach operation cannot continue because another object in this farm already contains the same id..... what to do?

  • You can not attach the same content database more than once in the same farm, are you sing the same farm for both debugging and UAT? Commented Nov 26, 2013 at 8:34
  • Yes using the same farm... this is a problem. Commented Nov 26, 2013 at 8:46
  • I don't understand why one would not be able to use a copy of a content database with a new name on the same farm. I tried adding the -assingnewdatabaseid parameter at the end of my attach script, but then there is no site collection in the content database. Commented Nov 26, 2013 at 8:50

1 Answer 1


You can't attach two copies of the same content database in the farm because the various GUIDs will be the same. Unfortunately the error messages you get when you do this are not especially helpful.

The workaround for this is to create a temporary farm somewhere and attach the database there - then back it up from that farm. This gives you a fresh set of GUIDs when you restore on the original farm.

If you just want the content, another solution is to use the unattached content database recovery option in the granular backup section in CA (SharePoint 2010 - not 2007). You can use this to get access to a copy of an existing content database or even an existing database in the same farm while it is still attached and live. You can then select the sites, lists etc. that you want and export them. The content can then be imported using PowerShell (e.g. Import-SPWeb - there is no UI for this).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.