Everything about SharePoint UserProfiles

on Thursday, February 25, 2010

There are two kinds of User Profile information stored within SharePoint. One is WSS Profile which gets stored in UserInfo table in the content database for each site collection.The other is MOSS Profile which gets stored in SSP database and that gets sync with AD at regular intervals by Profile Synchronisation job. There are two profile sync jobs

  1. The profsynch (Profile Synchronization) timer job which runs every hour
  2. The sweepsync (Quick Profile Synchronization) timer job which runs each minute

To run the Profile sync jobs yourself you can execute below command.
stsadm -o sync

-excludewebapps <Web applications>

-synctiming <schedule>

-sweeptiming <schedule>

-listolddatabases <days>

-deleteolddatabases <days>

-IgnoreIsActive <0/1>







A valid URL, such as "http://server_name"


Comma-delimited list of Web application URLs to exclude from consideration in the synchronization process. The values specified delete any existing values set.



Sets the schedule for the main synchronization job. "M" denotes every n minutes (for example, “m:5” means every 5 minutes). "H" denotes every n hours (for example, “h:1” means every 1 hour). "D" denotes the number of times per day (for example, “D:3” means three times per day).

The default is once per hour.


You can use the SPSchedule.FromString() string method to pass in the strings, “every 5 minutes” or “weekly xxxxxxx”. For additional information about the SPSchedule.FromString method, see SPSchedule.FromString method (http://go.microsoft.com/fwlink/?LinkId=85966&clcid=0x409).


A valid time value in the form of minutes, such as "1"


Performs the same tasks as the synctiming parameter. However, the sweeptiming parameter sets the schedule for the “sweep” job. The sweep job is driven by the Windows SharePoint Services 3.0 change log and is used as a lightweight way to capture new users added. For example, you might have a fully synchronized site, but then a user is added to the site. The sweep job ensures that the incremental newly added user gets the user profile properties replicated quickly.

The default value is every 1 minute.


A valid number of days, such as "2"


Lists content databases that have not been synchronized since n days. The presumption is that they have been deleted or moved.


A valid number of days


Performs the same operation as the listolddatabases parameter, except it deletes old records corresponding to these databases. It does not delete the databases themselves.


Boolean 0 or 1(Default 0)


The IgnoreIsActive flag allows you to choose which profiles to sync. By default, only the active profiles in a content database get sync'ed. An active profile is one of a user who has contributed something to the site. If you want to sync all users in the site, you can choose to trigger the execution of the sync job via STSADM with the IgnoreIsActive flag set to 1, and it will sync every profile.

This is something that a few people know about but a lot of people don’t so I thought I would take a few minutes to explain it. As most of you will know, WSS and MOSS are two seperate products, with MOSS extending WSS. User profile management is a MOSS feature that you get in your Shared Service Provider, which means that WSS won’t have it. To keep track of users in WSS each user will have a user profile that exists in each site collection (this is called the WSS profile). So what this means for a MOSS implementation is that your users will have at least two user profiles, a WSS user profile for each site collection they are a member of, as well as the main user profile that is stored in the SSP (the MOSS user profile).

The thing that sorta confused me with this though is that the two don’t instantly sync up. If you make a change in Active Directory and let the SSP import the new data, you will immediately see the change in the MOSS profile (so in the SSP and the user My Site) but you will not see it in the WSS profiles for the user (which you can see by browsing to a site and choose “My Settings” in the user menu). MOSS does have a timer job that will run to do this synchronisation but I’m not too sure how often it is meant to run.

However I did find a great post that talked about the issues with having the multiple profile sources, as well as how to fix it. Basically you can use the “stsadm -o sync” command to increase the schedule of a timer job that does the synchronisation of the details between the SSP and the site collections. I did that and got it updating great. So perhaps what would be a good idea would be to set this to run as often as your user profile imports are running from the AD, to ensure that when new information is sucked in from the AD it gets updated in your site collections. But definitely read that blog post, its got a lot of good information.