Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

Database attach error : An item with the same key has already been added

$
0
0

Hi,

 

Since i moved some content database from database server to another, i getting in trouble. My problem was on the MySite database. After moving this database and having too many errors, i decided to go back by removing the content database from the mysite webapplication, moving back the content database to the initial database server, and then reattach the database to the mysite webapplication. Unfortunately, the mysite didn't respond at all. So i tried to remove the database and reattach it once again before going further. I received the 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 Mount-SPContentDatabase command with the -AssignNewDatabaseId parameter. Note that if this new database and an existing database contain the same site collections, attaching this database will likely result in orphaned site collections due to conflicts between the two databases.

 

 After a quick look to the internet, i made this command with success :

 

 $orphanedDB= Get-SPDatabase | where{$_.Name-eq"MyContentDatabase"}

 

$orphanedDB.Delete()

 

Then i tried to reattach the mysite database and getting another error :

 

An item with the same key has already been added

 

Anyone had the problem?

 

thanks

 


Viewing all articles
Browse latest Browse all 13778

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>