Çarşamba

Failure trying to synch web application after attaching new content database to a web application

After restoring a content database from prod to test , and make the web application point to this new database, I started to see errors on Server Event log.



ERROR 1:
Event Type: Error
Event Source: Office SharePoint Server
Event Category: User Profiles 
Event ID: 5555
Date: 06.10.2010
Time: 11:00:03
User: N/A
Computer: xxxxxxxx
Description:
Failure trying to synch web application 7621f35a-0df2-4c88-8f03-0ce546db94bd, ContentDB d9248f2a-523c-4d86-b149-9ccfc08c6466  Exception message was A duplicate site ID e10eb63c-01dd-4227-98db-9fbfa1285ce9(http://xxxxxxx) was found. This might be caused by restoring a content database from one server farm into a different server farm without first removing the original database and then running stsadm -o preparetomove. If this is the cause, the stsadm -o preparetomove command can be used with the -OldContentDB command line option to resolve this issue.

ERROR 2:


Event Type: Error
Event Source: Office SharePoint Server
Event Category: User Profiles 
Event ID: 5553
Date: 06.10.2010
Time: 11:00:07
User: N/A
Computer: TUP03SRV74
Description:
failure trying to synch site 1eeae3e9-9412-4f73-a4df-b752d88c0329 for ContentDB 6a7a4d13-adc5-4605-a056-ae5216498ffe WebApp 3b98938e-c823-4c24-a19f-7c60a73bd306.  Exception message was Cannot complete this action.



Solution:



C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsa
dm -o sync -deleteolddatabases 0

For my case the output was:

Deleted sync information for DB a416fe1d-600d-46ff-a176-8f2fd3f7d454
Deleted sync information for DB 6a7a4d13-adc5-4605-a056-ae5216498ffe
Deleted sync information for DB 208737f0-6795-42ee-badd-dbfcaf0e5d02
Deleted sync information for DB b53fe383-2f27-499b-b612-f09748d90ae2

Then I listed the old databases to make sure that there were none left..


C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsa
dm -o sync -listolddatabases 0

Shared Service Provider SharedServices1
No databases match the criteria for this Shared Service Provider