Friday, July 23, 2010

SharePoint 2010: User Profile Synchronization Service will not start when using Named Instance in SQL Server 2008

While deploying a SharePoint 2010 farm recently in which I implemented database mirroring in SQL Server 2008 using two servers with a Named Instance respectively for each server (SQL1\PRINCIPAL and SQL2\MIRROR), I could not get the User Profile Synchronization Service to start. It would remain in a status of “Starting” for about 10 minutes before eventually showing a status of “Stopped”.

A quick glance on the ULS logs and I discovered the following errors:

ERROR ILMPostSetupConfiguration: ILM Configuration: Validating installation of SQL Service FAILED

and

ILM Configuration: Error 'ERR_CONFIG_DB'

and

UserProfileApplication.SynchronizeMIIS: Failed to configure MIIS post database, will attempt during next rerun. Exception: System.Configuration.ConfigurationErrorsException: ERR_CONFIG_DB at Microsoft.Office.Server.UserProfiles.Synchronization.ILMPostSetupConfiguration.ValidateConfigurationResult(UInt32 result) at Microsoft.Office.Server.UserProfiles.Synchronization.ILMPostSetupConfiguration.ConfigureMiisStage2() at Microsoft.Office.Server.Administration.UserProfileApplication.SetupSynchronizationService(ProfileSynchronizationServiceInstance profileSyncInstance). 1125abef-5af4-4214-93c5-4d74e8d103fb

After reading through dozens of blog posts, especially this one, I determined that the Forefront Identity Manager Synchronization Service (FIMSynchronizationService) was trying to connect to the Default Instance of SQL1, instead of the correct Named Instance of SQL1\PRINCIPAL. Not sure if this is default behavior out of the box, but sure seems to be that way.

The Workaround – configure a SQL alias on the application server. Here’s how:

On the SharePoint application server that you want to start the User Profile Synchronization Service on, perform the following:

1) Open the SQL Server Client Network Utility.





On the General tab, ensure you enable the Named Pipes and TCP/IP protocols.

2) On the Alias tab, select to Add a new alias.



Ensure TCP/IP is selected as the Network library protocol. For the Server alias, type the name of the SQL server. For me, it was the principal server in the database mirror – SQL1. In the Connection parameters, for the Server name, type the entire SQL Instance Name. For me, it was SQL1\PRINCIPAL. Select OK.

3) Start the User Profile Synchronization Service again.

Walla! It starts correctly now!



Hope this helps.

Wednesday, July 21, 2010

‘Deployment Status: Error’ when deploying solution (.wsp) to SharePoint farm

Quick Tip: When deploying a solution file to your SharePoint farm, if within 5 seconds you encounter an Error for deployment status (In Central Administration, under Operations, Solution Management) with no additional details, ensure the Windows SharePoint Services Administration service is started on all SharePoint servers in the farm. Also, ensure the service is running as the Local System account on each server.

Hope this quick tip saves you hours of troubleshooting!

Tuesday, June 1, 2010

SharePoint 2010 Edition Comparison

It's been a while since I last posted (has it really been over a year?!). So with the recent release of SharePoint 2010, I should have some good stuff posted over the next six months. Particularly, I have a few SharePoint 2010 deployments on my schedule and will be posting lessons learned from each project upon completion. In the meantime, Microsoft has a nice SharePoint 2010 Edition Comparison site now available. As you will see, SharePoint Foundation has some powerful functionality for a free product:

http://sharepoint.microsoft.com/en-us/buy/pages/editions-comparison.aspx

Monday, May 11, 2009

“Feature '20477d83-8bdb-414e-964b-080637f7d99b' is not installed in this farm, and cannot be added to this scope” when installing SP2

Yesterday evening, when installing Service Pack 2 to my test SharePoint farm, the configuration wizard failed on Step 3. After dissecting the Upgrade.log file located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs\Upgrade.log, I found the following error:

[WebApplicationSequence] [ERROR] [5/10/2009 6:51:13 PM]: Feature '20477d83-8bdb-414e-964b-080637f7d99b' is not installed in this farm, and cannot be added to this scope.

After further research, I discovered the feature referred to in the error (20477d83-8bdb-414e-964b-080637f7d99b) is the “PublishingTimerJobs” feature. To install this feature to the farm, run the following stsadm command:

stsadm -o installfeature -name PublishingTimerJobs

Next, I recommend forcing the timer job to execute immediately.

stsadm.exe -o execadmsvcjobs

Finally, run the configuration wizard again to successfully complete the installation of SP2 to the SharePoint farm:

psconfig -cmd upgrade -wait -inplace b2b

Hope this helps.

Wednesday, April 22, 2009

Exporting and Importing Subsites

Ever had a need to backup or migrate the content (libraries, lists, etc.) of a subsite in SharePoint? The STSADM command-line tool makes it very easy. As you know, STSADM can be used to backup a site collection at the parent level by using the backup operation. However, there may be times in which you want to backup a subsite, either before patching your SharePoint farm or in efforts of migrating the subsite to another farm or web application. You can accomplish this task by using the export and import operations of STSADM. The following is an example of exporting the contents from a team subsite:

stsadm -o export -url http://portal/sites/hr/team -filename C:\SharePointBackups\hrteam.cmp -includeusersecurity

The includeusersecurity parameter preserves the user security settings.

To migrate this data to another farm or web application, you issue the import operation, as follows:

stsadm -o import -url http://portal2/sites/hr/team -filename
C:\SharePointBackups\hrteam.cmp -includeusersecurity

NOTE 1: When importing to a new SharePoint farm, the new farm must be at the same patch level as the old farm. Also, you may encounter an error stating that one or more features are not available in the new farm, but exist in old farm. In my case, I got the error "Could not find Feature S2SiteAdmin". To fix this issue, follow these three simple steps:

1. Copy the appropriate feature directory from the old farm to the new farm. The feature directories are located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES. In my case, I copied the S2SiteAdmin directory from the old farm to the new farm.

2. Install the feature on the new farm by using the installfeature STSADM operation and the relative path to the Feature.xml file in your particular feature directory. In my case, I ran the following command:

stsadm -o installfeature -filename S2SiteAdmin\Feature.xml -name S2SiteAdmin

3. Activate the feature on the new farm by using the activatefeature STSADM operation. In my case, I ran the following command:

Stsadm -o activatefeature -name S2SiteAdmin -url http://portal2/sites/hr/team

NOTE 2: You must pre-create the subsite in the new environment before attempting to import to it. Also, the newly created subsite must use at least the same site template as the subsite to be imported, though I recommend using the Blank Site template to ensure the import runs without any issues.

The export and import STSADM operations are particularly useful if you administer project workspaces or subsites of a PWA (Project Web Access) site and need a good backup of their associated content before installing updates to the SharePoint farm. The PWA site is easy to recover by using the existing databases related to Project Server (Archive, Draft, Published, Reporting), but any project workspaces or subsites of the PWA site may require recovery using the import operation detailed in this blog post.

Thursday, April 2, 2009

Multiple Web Applications on Port 80

I have recently gotten a few questions (from SharePoint beginners) on how to run more than one SharePoint web application on port 80. Since there doesn’t seem to be a definitive set of instructions addressing this need, I thought I would “fill the void” in this blog post. In short, it’s all about using Host Headers! Now on to the detailed instructions...

Let’s assume you already have an existing web application (and associated site collections) using port 80. To add a new web application that also uses port 80, follow these three simple steps:

1. Ensure your existing web application has a host header. Open the Internet Information Services (IIS) Manager. Expand the Web Sites folder, right-click your existing web site, and select Properties. On the Web Site tab, select the Advanced button located in the Web site identification section. Highlight your web site entry and select to Edit. For the Host Header value, enter the name of your site URL without the http://. For example, if your site URL is http://portal, you would enter portal for the Host Header value. The screenshot below shows the Host Header value for a site URL named http://moss2007.



2. Create the new web application. In the Central Administration console, under Application Management, select Create or extend Web application, then Create a new Web application. Be sure to add the appropriate Host Header value, as shown in the screenshot below.



3. Ensure you have the appropriate Host (A) records in DNS for each of the Host Header values in your situation. Each Host (A) record must point to the IP address of the front-end web server or load balancer in your farm, as illustrated in the screenshot below.



All done!

Monday, March 23, 2009

Hide default system libraries on Publishing Site

When you create a publishing site, the publishing feature in SharePoint automatically creates three document (system) libraries: Documents, Images, and Pages.



The Documents system library is used to store documents that are attached to or related to publishing pages. The Images system library is used to store graphics and photos that are attached or related to publishing pages. The Pages system library is where pages that were created in the browser are stored.

To eliminate confusion with any user-created document libaries, you can hide these system libraries by following these simple steps:

1. Open your publishing site in Office SharePoint Designer 2007.
2. Right-click on each system library you want to hide and select Properties.
3. On the Settings tab, select to Hide from browsers.
4. Select OK.



Each system library is now hidden from browser view.

Tuesday, March 10, 2009

Advanced Search Web Part for SharePoint Lists

Recently, the Business Analysis manager at my current workplace requested the ability to search custom columns on individual lists (Project Tasks lists in particular) on a SharePoint site. Initially, I thought I could use the Advanced Search Box web part available out-of-the-box in SharePoint. I am already familiar with the document content search capabilities using metadata properties and the Advanced Search Box web part, but this approach is primarily used in searching for specific documents and files at the site collection level or within search scopes. Moreover, I discovered other complexities associated with the requested lists. For instance, some of the default list columns had been renamed instead of creating custom columns for unique information. Further research and Google searches returned nothing tangible, so I realized a custom web part was needed.

I don’t claim to be a true “SharePoint Developer”, but I can roll up the sleeves and dish out some .NET code when absolutely necessary. More importantly, I know WHEN the development of a custom web part is needed, and in my experiences it is pretty rare. For those that know EVERYTHING available in SharePoint out-of-the-box, you know what I am talking about. So, before taking the development route, I decided to take a quick look at Bamboo Solutions. Sure enough, they have exactly what I needed in their List Search Advanced Web Part. For a mere $300, you can deploy this cool web part and make it available throughout your entire SharePoint farm. Now that’s what I call efficiency!

With the List Search Advanced Web Part, you can:

  • Limit searches to a single list without the need to create an index and search scope.
  • Display search results by individual list item.

  • Customize views to define the display of the search results list, including columns, sorts, and groups.

  • Include AND / OR operators in the search criteria, and the ability to group the criteria.

  • Allow printing of the search results.

  • Require users to type in text when a Lookup field is selected instead of hindering web part performance by selecting from a drop-down list that has too much data.

Ok, so that’s two consecutive blog posts regarding Bamboo products. Before you ask, the answer is no -- I do not work for Bamboo Solutions nor do I receive any royalty from them. I simply believe in taking advantage of opportunities to be more efficient, particularly in regards to custom development. Of course, the quality must be there too, and Bamboo offers some of the best products on the market.

I promise my next blog post will not be about a product from Bamboo Solutions…