From http://www.cnblogs.com/DongJie1982/archive/2008/06/30.html
When stsadm.exe is used to back up a website set and restore it to other applications, the following errors often occur in the event log:
Event Type: Error
Event Source: Office Sharepoint Server
Event category: User Profiles
Event ID: 5553
Date: 4/28/2008
Time: 4:00:03
User: N/
COMPUTER :*****
Description:
Failure trying to synch site failed for contentdb login webapp ada1f800-c105-4970-bca0-c43d699daadc. exception message was cannot insert duplicate key row in object 'dbo. usermemberships 'with unique index 'cx _ usermemberships_recordid_membergroupid_sid '.
The reason for this is: in a form field, back up the current website level and restore it to another application. the same guid will be generated for data in two application locations. In this way, conflicts will occur during synchronization.
The solution is as follows:
Use contentdb to go to sqlserver to find the website level:
Database:Sharepoint_config,Table DBO. Objects
Select ID, classid, parentid, name, status, version, Properties
From objects where (ID = 'ada1f800-c105-4970-bca0-c43d699daadc ')
You can use this name field to find the website set, for example, 88.
Go to the management center and find the content database corresponding to the website set. For example, moss_qas_88_content.
Continue with the following operations.
A. Detach the database first:
Ststam-O preparetomove-contentdb {sqlserver: databasename}-site {site collection's URL}
B. Delete the content database:
Stsadm-O deletecontentdb-URL {application's URL. Ex: http: // MOSS: 8080}-databasename {databasename}-databaseserver {SQL Sever name}
C. Reattach the database:
Stsadm-O addcontentdb-URL {application's URL. Ex: http: // MOSS: 8080}-databasename {databasename}-databaseserver {SQL Sever name
OK. Restart IIS.
"% Systemdrive % \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ bin \ stsadm"-O preparetomove-contentdb 172.20.0.50: moss_qas_88_content
"% Systemdrive % \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ bin \ stsadm"-O deletecontentdb-URL http: // localhost: 88/-databasename moss_qas_88_content
"% Systemdrive % \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ bin \ stsadm"-O addcontentdb-URL http: // localhost: 88/-databasename moss_qas_88_content