Share via


The attach operation cannot continue because another object in this farm already contains the same ID.

Question

Monday, October 21, 2019 2:53 PM

I'm getting the error in the Title. How do I resolve this issue or remove the content database from the web application, so I can Mount the migrated content database?

Mike W

SharePoint Engineer - Mike

All replies (9)

Monday, October 21, 2019 5:00 PM ✅Answered | 1 vote

Firstly, what exactly are you trying to do ? are you trying to mount the database or dismount the database. If you are trying to mount the database that's not possible because that database is already mounted to your SharePoint farm. try dismounting that database using below command and then try mounting it back again and see.

Dismount-SPContentDatabase WSS_Content_SP

Thanks & Regards,

sharath aluri


Monday, October 21, 2019 3:09 PM

Add this to your mount command.** -AssignNewDatabaseId** something like below

Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication https://sitename -AssignNewDatabaseId

Thanks & Regards,

sharath aluri


Monday, October 21, 2019 3:20 PM

Thanks Sharath,

Will this cause any conflicts? I have Dismounted all databases from the WebApplication I am migrating to.

Mike W

SharePoint Engineer - Mike


Monday, October 21, 2019 3:26 PM

No, it won't. it just assigns the new database id. seems you already have same database id that why you are getting that error so, we are just assigning a New DB ID.

Thanks & Regards,

sharath aluri


Monday, October 21, 2019 4:39 PM

I get an error. Please see below:

A SharePoint database named Wss_Content_SP already exists. You must supply another name for the new database.

SharePoint Engineer - Mike


Monday, October 21, 2019 4:44 PM

seems like you are mounting the database which is already there, that won't work. you can't keep 2 databases with same name in SharePoint Farm.

Thanks & Regards,

sharath aluri


Monday, October 21, 2019 4:52 PM

What do you recommend. I'm looking at the Server hosting Microsoft Management Studio and I only see one database with that name.

Mike W

SharePoint Engineer - Mike


Monday, October 21, 2019 7:06 PM

I get an error. Please see below:

A SharePoint database named Wss_Content_SP already exists. You must supply another name for the new database.

SharePoint Engineer - Mike

What are you trying to do?  The error message listed makes it sound like you are trying to attach a database that is already attached to the farm, possibly on another web application?


Tuesday, October 22, 2019 9:31 AM

Hi Mike,

Thank you for marking the answer for the thread. It will do great benefit to other users in this forum.

Here I will provide a summary of this post for your information.

[The attach operation cannot continue because another object in this farm already contains the same ID]

Situation

====================

SharePoint Server 2010

Question

====================

When user mounts the migrated content database to the web application then occurs “The attach operation cannot continue because another object in this farm already contains the same ID” error and A SharePoint database named Wss_Content_SP already exists. You must supply another name for the new database error.

Solution

====================

According to Sharath’s reply, you should dismount the database first and then mount the migrated database.

Dismount the database:

Dismount-SPContentDatabase WSS_Content_SP

Mount database with new ID:

Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication https://sitename -AssignNewDatabaseId

And note you can't keep 2 databases with same name in SharePoint Farm.

Best Regards,

Julie

Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].

SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.