locked
connecting an exisiting database to WSS 3.0 sharepoint web application RRS feed

  • Question

  • Hi,

     I am trying to attach an exisiting database to web application, but getting this 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" operation 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. "

     

    Please help me resolve this issue.

    Sunday, February 3, 2013 1:47 PM

Answers

  • Hi,

    You cant add a ContentDB to the same Farm where it is inuse attached to another WebApp in the Farm. Remove the othere database prior to addingbthe current database to the farm.  Each site collection in a contentDB has a globally-unique identifier (GUID) associated in the configuration database. Adding the same site collection twice to the farm, even in separate Web applications, is not possible.  

    Although the database attach may succeed in this situation, the site collection cannot be started. 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.exe backup and restore operations to copy the site collection over to the other farm. The backup and restore process creates a new GUID for the site collection.

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders, Business Intelligence in SharePoint 2013.

    Monday, February 4, 2013 2:30 AM

All replies

  • Hi,

    You cant add a ContentDB to the same Farm where it is inuse attached to another WebApp in the Farm. Remove the othere database prior to addingbthe current database to the farm.  Each site collection in a contentDB has a globally-unique identifier (GUID) associated in the configuration database. Adding the same site collection twice to the farm, even in separate Web applications, is not possible.  

    Although the database attach may succeed in this situation, the site collection cannot be started. 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.exe backup and restore operations to copy the site collection over to the other farm. The backup and restore process creates a new GUID for the site collection.

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders, Business Intelligence in SharePoint 2013.

    Monday, February 4, 2013 2:30 AM
  • Hi ,

    Try the below command

    stsadm.exe -o addcontentdb -url <URL name> -databasename <database name>

    Also make sure the db is not in use or the db is copied in the same instance and is been used


    Regards - Sushant Khambekar - MCTS Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. Sharepoint Admin - Moss 2007 , Sharepoint 2010 http://www.sharepointdirect.blogspot.com/ http://sharepointtechs.wordpress.com/

    Wednesday, February 6, 2013 1:22 PM