Thursday, June 26, 2008

Sharepoint: Failure to sync user profile

This site seems to have a fix. Stsadmin command to update farm credentials: stsadm -o updatefarmcredentials

And this one seems to have a step-by-step solution to solve it forever!

There's a good chance that you have a profile synchronization issue (or several). Here are the steps I took to correct these errors:

1. I downloaded a wonderful, free (yes, FREE!) utility called SharePoint Inspector, created by Gat Bouveret. His blog with a link to the codeplex download site can be found here. I used this tool to identify the web applications and sites referred to by their GUID in the event log errors.

2. I opened a command prompt and typed stsadm- o preparetomove –Site http://whatevertheguiltysiteis –OldContentDb

3. After this completed successfully, I ran stsadm –o sync –deleteolddatabases 0 (note: Depending on how long you’ve been seeing these errors, you may be able to use a switch greater than zero. If it’s been 2 days since it synched last, you can use 2. You can tell this by typing stsadm –o sync –listolddatabases and look for the offending content db guid.

In my case, there were 4 “my site” sites that were not syncing with the profile database. After performing these steps, I rechecked the event log at the top of the hour to see if the errors had reoccurred. GONE!

A little something extra: I have also had to do this on occasions where a web application was deleted, leaving the content db intact, and re-created attaching to the same content db without first running the prepare to move command. Same steps apply.

Hope this helps!