Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
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? –  Robert Lindgren Nov 26 '13 at 8:34
    
Yes using the same farm... this is a problem. –  Pieter Du Toit Nov 26 '13 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. –  Pieter Du Toit Nov 26 '13 at 8:50

1 Answer 1

up vote 2 down vote accepted

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).

Source

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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