Tuesday, November 10, 2009

User Profiles Changes Are Not Updating Across the Farm

This “feature” shows up when a user changes their last name, email address account name or any other information which is replicated from an external source. The best example is changing a last name in Active Directory, which then changes the email address and account name (i.e. Jane Doe changes to Jane Johnson and email changes to jdoe@email.com to jjohnson@email.com).
What should happen is that SharePoint picks up the changes and synchronizes the information with the user profile throughout the entire environment. But in a lot of cases the updated information is not reflected in the farm!

This happens because there are two user profiles in a Microsoft SharePoint Standard or Enterprise farm. This is because the base Windows SharePoint Services application has one profile and MOSS has one. This is because you can install Windows SharePoint Services without MOSS, but you cannot install MOSS without installing the base WSS. So, Windows SharePoint Services provides for a basic user profile, while the addition of MOSS adds a more advanced user profile.

So, what happens in the instance where the user information isn’t replicating, the problem is that the synchronization jobs are simply not happening. To force the synchronization to happen, you can use the following commands:


stsadm -o sync
-excludewebapps
-synctiming
·         "M" denotes every n minutes (m:5 means every 5 minutes).
·         "H" denotes every n hours (h:1 means every 1 hour)
·         "D" denotes the number of times per day (D:3 means three times per day)
-sweeptiming
-listolddatabases
-deleteolddatabases

Changes the Profile Sync job (MOSS)
stsadm -o sync –synctiming m:2

Changes the Quick Profile Sync job (WSS)
stsadm -o sync –sweeptiming 1

There’s another scenario for synchronization not happening. The example is when you first visit a site a record is recorded in the UserInfo table of the sites Content Database. The field tp_IsActive is defaulted to false, which means you have visited but have not interacted with the site.

The Sync process uses this value to determine if the user info should be replicated in the sync process. So, if you were to make a change to the profile information in AD and refresh the site that you had only visited and see the information is still the same, it was not updated.

If you now interact with the site, either add a document or edit a link, in effect become an active user of the site, and then run the stsadm -o sync command, the profile changes to the user name will be replicated to the site.

There are instances where the two commands don’t necessarily solve the problem. This happens when content databases become stale or have not been synchronized. In this case, there are stale records which need to be cleaned up prior to synchronization.

The following command should cleanup stale records.
Lists Old Content Databases
stsadm -o sync -listolddatabases 2

Cleans up Old Records (Does Not delete databases, just the old records corresponding to the databases)
stsadm -o sync -deleteolddatabases 2

No comments:

Post a Comment