Problem:
After a database migration, from a MOSS 2007 Beta 2 TR Farm to RTM, SharePoint 2007 was writing errors to the event log every hour. These are the errors below (I have edited them):
Source: Office Sharepoint server
Category: Office server general
event id: 7888
Description:
A runtime exception was detected. A duplicate site ID was found.
Cause:
Restoring a content database from one farm to another without first deleting without first removing the Original database and then running stsadm -o preparetomove
Resolve:
Run stsadm -o preparetomove -oldcontentdb
Source: Office Sharepoint server
Category: User profiles
event id: 5555
Description:
Failure to synch web application
Cause:
Restoring a content database from one farm to another without first deleting without first removing the original database and then running stsadm -o preparetomove
Resolve:
Run stsadm -o preparetomove -oldcontentdb
Answer:
The suggestion in the event log didn't work for me. I ran stsadm with the preparetomove operation and it didn't fix.
The cause of t errors is that the sitesync table in the content database of the SSP has references to database ID's that don't exist anymore. Or they don't match up to the sites that the configuration database is aware of.
To clear down the sitesynch table I ran this at the command line:
stsadm -o sync -DeleteOldDatabases 0
The next time the schedule task ran, there were no errors in the event log.