In a previous post I spoke about how importance of pre-populating SharePoint’s Content Database’s UserInfo table with users for landing/root (and/or very popular) sites just before a large release of a new SharePoint web application. While I did mention the API you could call to make all this happen I did not provide any tooling. This post is about a small tool I wrote, which at this point has been used with a couple of customers, to pre-populate UserInfo tables.The tool itself comes in two flavors – one for MOSS 2007 and the other for SharePoint 2010 Server. Both flavors allow you to export users from the User Profile Store to a flat file which can then be imported in a manner which populates the UserInfo table. In addition, the SharePoint 2010 version supports both Windows and Claims users.
When an authenticated user, whom has never visited a site collection, first visits a site there are a number of tables within the Content database which must be updated. This activity can be expensive and performance can suffer when the site collection is the root of a web application which has just been announced or released for the first time into production. In fact, I have seen first hand this behavior take down a very large SQL server upon initial launch of a large intranet site to the point we had to roll back and I have teammates which have had the same experience (hence this post).
Just in time for summer break here in the US the SharePoint product team has released a good number of fixes for SharePoint 2010. Service Pack 1 and the June Cumulative Update (CU) is now available for download. These are fairly substantial updates when you consider the number of bugs that have been fixed and in the case of SP1 the new improvements which have been made. To put it another way, SharePoint Server 2010 is about 1.47 GB and the Uber Package for the June CU (Foundation+Server) has a size of just about 1 GB.
I do not normally create blog posts around topics which are covered on other blogs on the Internet however this topic seems to still draw a bit of confusion as well as I wanted to offer a very complete picture (pun totally intended) of how to move user pictures from Active Directory into SharePoint User Profiles.
For this walkthrough I am using a SharePoint 2010 Farm running the April 2011 CU and a single domain controller on Windows 2008 R2.
The SharePoint 2010 August CU has a good number of User Profile Service (UPS) fixes and is worth installing. You may however notice a couple of fun error messages which start to appear to fill your Windows Application event logs, for example:
I Have had the great honor of hitting a good number of errors while setting up the User Profile Sync service. I documented one error here but when setting up another environment today I hit yet another. The environment in question was a two server setup with one server being the DC and the other SharePoint + SQL Server. I use the farm account CONTOSO\FarmAccount. I setup all Service Applications using the PowerShell script found here and started the services I wanted to run. When I got to starting the User Profile Synchronization Service I would eventually see the following error in the event log.