Category Archives: SharePoint

How to annoy your SharePoint admins – Circular Loop with Lookup Columns

The SharePoint June 2009 Cumulative Update fix list contains this entry (

When a SharePoint user creates a circular loop between lookup columns, if you click one of the lists that contain lookup columns, this action will cause 100% CPU usage on the SharePoint server. To work around this issue, you have to perform an application pool recycle.

(Also mentioned on my SharePoint updates page:

I tested and this issue can be reproduced very easily.

1. Create two custom lists, for example list1 and list2


2. Create a column in list1, for example c-list1. It is of type “Single line of text”


3. Create a column in list2, for example c-list2. It looks up the column c-list1 in list1.


4. c-list1 cannot be changed to type Lookup, so we have to delete it.


5. Recreate c-list1 as type Lookup and let it lookup c-list2 in list2.


6. Open list1 or list2 and enjoy the CPU load. Only IISREST helps here. At least until the next access to list1 or list2.


If you apply the June 2009 CU, one of the existing columns will be changed to lookup the title column in the other list, not the lookup column.

If you try to create the circular loop columns when the June 2009 CU is applied, one of the columns will be changed to lookup the title column in the other list, not the lookup column.

SharePoint (MOSS) Search, wrong IP in HOSTS file

A customer recently had problems with crawling his Web Application. This problems were solved, but after that, the crawl broke again.

After some investigation, I found out that the IP address of the dedicated WFE for crawling was wrong. SharePoint entered the wrong IP address in the HOSTS file.

What happened?
I configured the Search Service to use one dedicated WFE for crawling. This is very useful, because the other two WFEs can be used for user access only (they are load balanced).

Here is a picture of that:


I discovered that the HOSTS file was filled with the first entry IPCONFIG shows on the target WFE:


The .178 was added to the HOSTS file, but not reachable from the index server, it should have been the .148. The crawl was impossible.


I configured the search service on the index server to use all WFEs for crawling. This way, it does not touch the HOSTS file and I was able to enter the right address to it manually.

Thanks to for guiding me in this direction.

Microsoft Log parser and SharePoint ULS Logs

Recently I had to search all ULS logs on the servers of a customer because a Microsoft engineer (thanks Robin) found this failure in a portion of a provided log:

Aborting profile synchronization for content DB xxx

We wanted to see how often the failure happened in the past. I did some searching and found Microsoft Log Parser 2.2.

With Log Parser you can do SQL like queries in Windows event logs, IIS logs and all kind of text based logs. I am not a genius when it comes to SQL queries, but this query lead to success on the customers servers:

SELECT  * INTO c:\logparser\out.txt FROM ‘C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\%computername%*.log’ HAVING Message LIKE ‘%aborting profile sync%’

Some explanation:

  • “INTO c:\logparser\out.txt” puts the output to out.txt
  • “%computername%*.log” was used because only ULS logs should be considered, not the upgrade.log, for example
  • “LIKE ‘%aborting profile sync%’” was used as the actual search query

I saved this query to the file query.txt and ran this command:

LogParser -i:tsv -o:tsv file:c:\logparser\query.txt

Again, some explanation:

  • -i:tsv defines that the input file is tab separated (like the ULS logs)
  • -o:tsv defines that the output file should be tab separated

The search in 1,5 GB ULS logs took about one minute!

When you want to use Log Parser, be sure to take a look at the included help file to learn about more input and output types.

List all Web features with Object Model

Just a little C# sniplet which lists all feature IDs of a SharePoint web:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;
namespace SiteCollections
    class Program
        static void Main(string[] args)
            SPFarm farm = SPFarm.Local;
            SPWebService service = farm.Services.GetValue<SPWebService>(“”);
            foreach (SPWebApplication webapp in service.WebApplications)
                Console.WriteLine(“Web Application: ” + webapp.Name);
                foreach (SPSite site in webapp.Sites)
                    Console.WriteLine(” Site Collection URL: ” + site.Url);
                    foreach (SPWeb web in site.AllWebs)
                        Console.WriteLine(“  Web URL: ” + web.Url);
                        foreach (SPFeature feature in web.Features)
                            Console.WriteLine(“    Feature ID: ” + feature.DefinitionId);

Microsoft Office Sharepoint Server 2007 (MOSS) Cumulative Update for August 2008 released, Build 6327

As of August, 26th 2008, the new August post-SP1 Update was released by Microsoft. It fixes a lot of issues and should be obtained from Microsoft Support Services.

The build after installing this hotfix is 12.0000.6327.5000.

The KB article mentioned here is not public yet, but it should be very soon.

For more details, see this article:

Microsoft Office Sharepoint Server 2007 (MOSS) – Advanced Search – Turn on “contains” again

As you may have noticed the "contains" and "does not contain" search options were removed with build 6317.

The reason for this is, that this options can heavily decrease performance. But you can simply turn the options on again:

1. Goto to the Advanced Search site and edit it

2. Modify the "Advanced Search Box" Webpart

3. Expand Properties and edit Properties

4. Find "Option Name=AllowOpContains" and change the Value to "True"
<Name=AllowOpContains" Value="False"> –> Contains option turned off
<Name=AllowOpContains" Value="True"> –> Contains option turned on
If you cannot find the entry, create it.

5. Click OK and publish the page.

Have fun!