Troubleshoot MOSS Profile Sync Issues
There was a problem at a client site where user profiles were not getting synced on certain content databases while others were getting synced.
Out of the box, MOSS is set to run the profile sync timer job once every hour. So I ran the following command to show me which content DBs haven’t been synced in the last day:
stsadm.exe -o sync -listolddatabases 1
On my vpc, it looks like this:
This looks helpful except for the fact that nobody knows what the GUID of their content DBs are. On the client farm there some DBs with very old dates and I could tell something was wrong. I needed to figure out what the names of the DBs with the old GUIDs are. The easiest way to do that is to browse to Central Administration and mouse-over your content DBs. Then you can eyeball the DB GUIDs in the status bar of your browser as it shows you the URL of the hyperlink. It looks like this:
The GUID of the content DB you are pointing to starts after the “DatabaseID=%7B” in your status bar. Also take note that the “%2D” in the status bar refers to the hyphen character. Now you know the GUID of that SharePoint Content Database.
I tried going back to the command-line to use stsadm to force it to sync. To do that I just typed in:
stsadm.exe –o sync
I waited a while and even checked the timer job status in Central Admin and waited for it to say the Profile Sync job had completed successfully. It turns out that this sync command only forces the “quick” version which does not go through the same job that that is scheduled for every hour. I was disappointed to see that my content database did not get updated so now I used stsadm to wipe out my profile sync info for the databases with old data. The following command will delete the profile sync data for databases that haven’t been synced in the last day:
stsadm.exe –o sync –deleteolddatabases
I was feeling good about myself at this point but after double-checking my work I learned that it STILL had not synced. There was no getting around it, I had to look at the ULS logs. When I poked around I found a line that kept showing up that alarmed me. Referring to “SharePoint Portal Server User Profiles” the description portion of the error said something like “Aborting sweepsynch for guid instance {SomeGUID} due to null or non-online content database”.
This sounded familiar to me because I knew we had left some content databases in “offline” mode to prevent them from getting new site collections created in them (they’re already too big). So when I looked back in Central Administration to see which databases were offline, it turned out to be every one of the ones that weren’t syncing the profiles.
This isn’t documented anywhere but it looks like content databases that are marked as “offline” in central administration will not get synced with profile sync jobs. Once I turned them all back to “ready”, I had a very looooong running profile sync job after that and it was all clear from there on out.
Get Firefox 3
Ultimate Boot CD
Been looking all morning for a reason why some sites sync and others don’t. This fixed it for me. Also, it looks like MS is aware of the issue (http://support.microsoft.com/kb/2000856) and I hope they issue a fix for it.
For now, I’m just going to turn all my DBs online and get them synced and then turn them offline again. Then, I’ll wait for the next user to complain about their info not being up to date.
Thanks again!
Well written and researched. I wasn’t aware of this issue.