<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Developer&#039;s Blog &#187; MDS</title>
	<atom:link href="http://blog.hoegaerden.be/tag/mds/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hoegaerden.be</link>
	<description>SQL Server, BI, .NET, IT and anything else I have been playing with.</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Master Data Services: The Book</title>
		<link>http://blog.hoegaerden.be/2011/08/28/master-data-services-the-book/</link>
		<comments>http://blog.hoegaerden.be/2011/08/28/master-data-services-the-book/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 11:30:48 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Master Data Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[MDS]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2011/08/28/master-data-services-the-book/</guid>
		<description><![CDATA[I’ll admit it, I’ve been involved in the process of book writing!  I wasn’t the writer, no, I left that task to Jeremy Kashel, Martyn Bullerwell and Tim Kent, three guys working for a UK-based company called Adatis. I cooperated as one of the Technical Reviewers, which means I’ve read the whole book before it [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Microsoft SQL Server 2008 R2 Master Data Services" href="http://www.packtpub.com/microsoft-sql-server-2008-r2-master-data-services/book?tag=rk/r2mds-abr1/0711" target="_blank"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border: 0px;" title="Microsoft SQL Server 2008 R2 Master Data Services" src="http://blog.hoegaerden.be/wp-content/uploads/image423.png" border="0" alt="Microsoft SQL Server 2008 R2 Master Data Services" width="289" height="350" align="right" /></a>I’ll admit it, I’ve been involved in the process of book writing!  I wasn’t the writer, no, I left that task to <strong>Jeremy Kashel, Martyn Bullerwell and Tim Kent</strong>, three guys working for a UK-based company called Adatis.</p>
<p>I cooperated as one of the Technical Reviewers, which means I’ve read the whole book before it was published.  Obviously, just reading was not all.  I tried out all exercises to ensure that the code did not contain any mistakes and commented on possible errors, or difficult-to-understand paragraphs due to lack of details or sentences that were phrased in a weird way.</p>
<p>And I have to say, I was surprised by the quality of the text before it was even read by a Technical Reviewer.  It’s not easy to write several chapters, building further on the result of the previous one, without making any mistakes.  But the guys managed to do that just fine!</p>
<p>So, if you’re looking for a good book on <strong>Master Data Services</strong>, have a look at the <a title="Microsoft SQL Server 2008 R2 Master Data Services" href="http://www.packtpub.com/microsoft-sql-server-2008-r2-master-data-services/book?tag=rk/r2mds-abr1/0711" target="_blank">Microsoft SQL Server 2008 R2 Master Data Services</a> book, published by Packt Publishing.</p>
<p>The book is aimed at everyone new to MDS, no prior knowledge is required.  You will need to know SQL Server though, but as you’re reading my blog I’m sure that shouldn’t be a problem.</p>
<p>This doesn’t mean that it won’t go into detail though, don’t misunderstand me here.  If you’ve read the book from start to finish, you will have thorough knowledge of Master Data Services!</p>
<p>Happy reading,</p>
<p>Valentino.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2011%2F08%2F28%2Fmaster-data-services-the-book%2F&amp;title=Master%20Data%20Services%3A%20The%20Book" id="wpa2a_2"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2011/08/28/master-data-services-the-book/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finding Similar Strings With Fuzzy Logic Functions Built Into MDS</title>
		<link>http://blog.hoegaerden.be/2011/02/05/finding-similar-strings-with-fuzzy-logic-functions-built-into-mds/</link>
		<comments>http://blog.hoegaerden.be/2011/02/05/finding-similar-strings-with-fuzzy-logic-functions-built-into-mds/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 13:58:30 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Master Data Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2011/02/05/finding-similar-strings-with-fuzzy-logic-functions-built-into-mds/</guid>
		<description><![CDATA[This post is inspired by a presentation that’s available on the Microsoft TechEd Online website.  It’s called Master Data Management – Merging from Multiple Sources, and is presented by Dejan Sarka, one of the Solid Quality Mentors and writer of several SQL Server-related books. Even if you’re not interested in Master Data Services (MDS), the [...]]]></description>
			<content:encoded><![CDATA[<p>This post is inspired by a presentation that’s available on the <a title="Microsoft TechEd Online" href="http://www.msteched.com/" target="_blank">Microsoft TechEd Online website</a>.  It’s called <a title="Master Data Management – Merging from Multiple=" target="_blank">Master Data Management – Merging from Multiple Sources</a>, and is presented by <strong>Dejan Sarka</strong>, one of the Solid Quality Mentors and writer of several SQL Server-related books.</p>
<p>Even if you’re not interested in Master Data Services (MDS), the following will be good to know if you need to compare strings with each other for similarity and find the string that’s the closest match to your input string.</p>
<h2>Compare Strings Why?</h2>
<p>You may be wondering in what scenarios you’d be required to compare strings for similarity.  To clarify, I’ll give you an example.  Imagine you’re building a data warehouse (DWH).  This DWH receives data from several different source systems.  In two of those systems, you’ve got a list of customers.  To be able to populate your DimCustomer table and avoid duplicate customers, you need to implement some logic to detect that customer Smith in System A is the same customer Smith in System B.</p>
<p>That’s when string similarity or fuzzy-logic functions come in handy.</p>
<h2>Compare Strings How?</h2>
<p>When strings are 100% equal, it’s obviously not difficult to find matching strings.  Just use the equals (=) operator in your query and you’ve matched them.  However, when strings are not 100% equal, due to typing errors or whatever cause, things get a little more complicated.  Perhaps customer Smith in System A is called Smyth, Smiht or even Smiths in System B while they are actually one and the same person.  That’s when we need to use additional logic, which we – not being rock star mathematicians ourselves – can hopefully find in built-in system functions.</p>
<h3>The Built-in Soundex() And Difference() Functions</h3>
<p>The standard functionality available in SQL Server to compare strings is fairly limited.  You’ve probably heard of the SOUNDEX() function, maybe even used in somehow already.  This function receives a string as parameter and calculates a four-digit code out of it.  When used on two similar strings, the two strings will produce the same code.  When they are not similar, you get two different codes.  And that’s it.</p>
<p>Here’s an example:</p>
<pre class="code"><span style="color: blue;">select </span><span style="color: magenta;">SOUNDEX</span><span style="color: gray;">(</span><span style="color: red;">'Smith'</span><span style="color: gray;">), </span><span style="color: magenta;">SOUNDEX</span><span style="color: gray;">(</span><span style="color: red;">'Smiht'</span><span style="color: gray;">), </span><span style="color: magenta;">SOUNDEX</span><span style="color: gray;">(</span><span style="color: red;">'Washington'</span><span style="color: gray;">)</span></pre>
<p><a href="http://11011.net/software/vspaste"></a>The result of that query is:</p>
<p><img style="display: inline; border: 0px;" title="Result of SOUNDEX query" src="http://blog.hoegaerden.be/wp-content/uploads/image368.png" border="0" alt="Result of SOUNDEX query" width="347" height="41" /></p>
<p>Is it perfect?  No, it’s not.  If you’d give it a value of ‘Smiths’, it would return S532, which is different from S530 even though there’s only one letter of difference between the two strings.</p>
<p>Next to SOUNDEX() we’ve got the DIFFERENCE() function.  This function accepts two parameters and returns an integer between 0 and 4.  What this function does is it calculates the soundex value for both strings and returns the number of characters of the code that are matching.  In the case of a comparison of ‘Smith’ with ‘Smiths’, it would return 3 because three characters are matching (‘S53’).</p>
<p>Let’s move on to an alternative solution.</p>
<h3>The Similarity Function In Master Data Services</h3>
<p>The MDS installation procedure goes through several steps to get all the required functionality installed.  One of those steps is the creation of a database.  What’s interesting about this database, even if you’re not interested in MDS or Master Data Management, are the custom functions that it contains.</p>
<p>One of those functions is called <strong>Similarity</strong>, located in the <strong>mdq</strong> schema.  This function allows you to compare two strings with each other through a specified match algorithm.  What’s interesting here is that you can choose between those four different algorithms depending on your data.  In some cases a certain algorithm will be more interesting while in other cases the best algorithm will be another one.</p>
<p>The value returned by the Similarity function is a float between zero and one, which makes it more precise than the soundex option.</p>
<p>So how do you use the function?  Let’s have a look at its definition:</p>
<pre class="code"><span style="color: blue;">ALTER FUNCTION </span>[mdq]<span style="color: gray;">.</span>[Similarity]<span style="color: gray;">(</span>@input1 [nvarchar]<span style="color: gray;">(</span>4000<span style="color: gray;">), </span>@input2 [nvarchar]<span style="color: gray;">(</span>4000<span style="color: gray;">),</span>

  @method [tinyint]<span style="color: gray;">, </span>@containmentBias [float]<span style="color: gray;">, </span>@minScoreHint [float]<span style="color: gray;">)
</span><span style="color: blue;">RETURNS </span>[float] <span style="color: blue;">WITH EXECUTE AS CALLER</span><span style="color: gray;">, </span><span style="color: blue;">RETURNS </span><span style="color: gray;">NULL </span><span style="color: blue;">ON </span><span style="color: gray;">NULL </span>INPUT
<span style="color: blue;">AS
EXTERNAL </span>NAME [Microsoft.MasterDataServices.DataQuality]<span style="color: gray;">.</span>

<span style="color: gray;"> </span>  [Microsoft.MasterDataServices.DataQuality.SqlClr]<span style="color: gray;">.</span>[Similarity]</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>As you can see, this is not a standard T-SQL function but it’s been implemented in .NET through CLR Integration.  The function expects five parameters.  The first two parameters, @input1 and @input2, are the two strings that need to get compared.  The third parameter specifies the match algorithm that should be used.</p>
<p>Here are the four algorithms as supported by the Similarity function:</p>
<table border="1" cellspacing="0" cellpadding="2" width="499">
<tbody>
<tr>
<td width="198" valign="top"><strong>Value for @method</strong></td>
<td width="299" valign="top"><strong>Algorithm</strong></td>
</tr>
<tr>
<td width="198" valign="top">0</td>
<td width="299" valign="top">The Levenshtein edit distance algorithm</td>
</tr>
<tr>
<td width="198" valign="top">1</td>
<td width="299" valign="top">The Jaccard similarity coefficient algorithm</td>
</tr>
<tr>
<td width="198" valign="top">2</td>
<td width="299" valign="top">A form of the Jaro-Winkler distance algorithm</td>
</tr>
<tr>
<td width="198" valign="top">3</td>
<td width="299" valign="top">Longest common subsequence algorithm</td>
</tr>
</tbody>
</table>
<p>The fourth parameter, @containmentBias, specifies how exact the fuzzy index should be when comparing strings of different lengths.  Values go from 0.0 to 1.0 with the lower number being the more precise one.  This only applies to the Jaccard and longest common subsequence algorithms.  The default is 0.85.</p>
<p>The fifth parameter, @minScoreHint, influences the calculated scores returned by the Similarity function.  Valid values go from 0.0 to 1.0.  When a value greater than 0 is passed, any calculated score under that value will result in zero.</p>
<p><strong><span style="text-decoration: underline;">Note:</span></strong> according to the Books Online, this fifth parameter is optional.  But it’s not.</p>
<p><strong><span style="text-decoration: underline;">Note:</span></strong> also according to the Books Online, a value of 4 for @method would also be accepted.   In that case the function will use a date comparison algorithm, thus the two first parameters should be either DateTime values or valid dates that are strings specified in the format<em> yyyy-mm-dd</em>.  However, when testing this out I noticed that this is not working.  Further exploration of the MDS database led me to another function called <strong>SimilarityDate</strong>, also located in the <strong>mdq</strong> schema:</p>
<pre class="code"><span style="color: blue;">ALTER FUNCTION </span>[mdq]<span style="color: gray;">.</span>[SimilarityDate]<span style="color: gray;">(</span>@date1 [datetime]<span style="color: gray;">, </span>@date2 [datetime]<span style="color: gray;">)
</span><span style="color: blue;">RETURNS </span>[float] <span style="color: blue;">WITH EXECUTE AS CALLER</span><span style="color: gray;">, </span><span style="color: blue;">RETURNS </span><span style="color: gray;">NULL </span><span style="color: blue;">ON </span><span style="color: gray;">NULL </span>INPUT
<span style="color: blue;">AS
EXTERNAL </span>NAME [Microsoft.MasterDataServices.DataQuality]<span style="color: gray;">.</span>

<span style="color: gray;">  </span>[Microsoft.MasterDataServices.DataQuality.SqlClr]<span style="color: gray;">.</span>[SimilarityDate]</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>From the looks of it, this function implements the functionality as explained in the BOL for @method = 4.  And this one is actually working!</p>
<p>So how do you find out which of the four algorithms is the most interesting one in your situation?  You’ll have to try it out.  Take a sample data set and run the four algorithms on the data.  As I don’t have any real-world data to use here (it wouldn’t be legal anyway), I’ll demonstrate this using some data from the ContosoDW database.</p>
<p>The following query uses the Customer dimension and combines that with a very small set of “sample” data that imitate some real-world problems like typos.</p>
<pre class="code"><span style="color: blue;">with </span>DistinctLastname <span style="color: blue;">as
</span><span style="color: gray;">(
    </span><span style="color: blue;">select distinct </span>LastName
    <span style="color: blue;">from </span>DimCustomer
<span style="color: gray;">),
</span>NewData <span style="color: blue;">as
</span><span style="color: gray;">(
    </span><span style="color: blue;">select </span><span style="color: red;">'Wahsington' </span><span style="color: blue;">as </span>LastName2 <span style="color: green;">--typo
    </span><span style="color: blue;">union select </span><span style="color: red;">'Wqshington' </span><span style="color: green;">--QWERTY/AZERTY mixup
    </span><span style="color: blue;">union select </span><span style="color: red;">'Zqtson' </span><span style="color: green;">--QWERTY/AZERTY mixup x2
</span><span style="color: gray;">)
</span><span style="color: blue;">select </span>DistinctLastname<span style="color: gray;">.</span>LastName<span style="color: gray;">, </span>NewData<span style="color: gray;">.</span>LastName2
<span style="color: blue;">into </span>#SampleData
<span style="color: blue;">from </span>DistinctLastname
<span style="color: gray;">cross join </span>NewData
<span style="color: blue;">where </span>LastName <span style="color: gray;">is not null;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>I’m only using the LastName column here.  In a real situation you’d probably want to combine that with FirstName and also some address-related data such as city and street.</p>
<p>Up next is letting the algorithms loose on the data set:</p>
<pre class="code"><span style="color: blue;">select </span>LastName<span style="color: gray;">, </span>LastName2<span style="color: gray;">,
    </span>MDS<span style="color: gray;">.</span>mdq<span style="color: gray;">.</span>Similarity<span style="color: gray;">(</span>LastName<span style="color: gray;">, </span>LastName2<span style="color: gray;">, </span>0<span style="color: gray;">, </span>0.85<span style="color: gray;">, </span>0<span style="color: gray;">) </span><span style="color: blue;">as </span>Levenshtein<span style="color: gray;">,
    </span>MDS<span style="color: gray;">.</span>mdq<span style="color: gray;">.</span>Similarity<span style="color: gray;">(</span>LastName<span style="color: gray;">, </span>LastName2<span style="color: gray;">, </span>1<span style="color: gray;">, </span>0.85<span style="color: gray;">, </span>0<span style="color: gray;">) </span><span style="color: blue;">as </span>Jaccard<span style="color: gray;">,
    </span>MDS<span style="color: gray;">.</span>mdq<span style="color: gray;">.</span>Similarity<span style="color: gray;">(</span>LastName<span style="color: gray;">, </span>LastName2<span style="color: gray;">, </span>2<span style="color: gray;">, </span>0.85<span style="color: gray;">, </span>0<span style="color: gray;">) </span><span style="color: blue;">as </span>JaroWinkler<span style="color: gray;">,
    </span>MDS<span style="color: gray;">.</span>mdq<span style="color: gray;">.</span>Similarity<span style="color: gray;">(</span>LastName<span style="color: gray;">, </span>LastName2<span style="color: gray;">, </span>3<span style="color: gray;">, </span>0.85<span style="color: gray;">, </span>0<span style="color: gray;">) </span><span style="color: blue;">as </span>LongestCommonSubsequence
<span style="color: blue;">from </span>#SampleData<span style="color: gray;">;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Copy the results of that query to Excel for further, and easier, analysis.  You can easily sort your data in Excel, so that the highest calculated scores of a certain algorithm are located on top.</p>
<p>Let’s first start by sorting on the <strong>Levenshtein</strong> results:</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image369.png"><img style="display: inline; border: 0px;" title="Results ordered on Levenshtein value" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb84.png" border="0" alt="Results ordered on Levenshtein value" width="700" height="123" /></a></p>
<p>As you can see, the three values that we were looking for are located on top.  That’s a good sign!  Furthermore, the Washington values are quite high.  So based on my sample data this is possibly a good algorithm.</p>
<p>How about the <strong>Jaccard</strong> results?</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image370.png"><img style="display: inline; border: 0px;" title="Results for the Jaccard algorithm" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb85.png" border="0" alt="Results for the Jaccard algorithm" width="700" height="175" /></a></p>
<p>You can clearly see that the maximum values for the Jaccard algorithm are significantly lower than those of the other algorithms.  Furthermore, the correct value for Watson is scoring lower than Son.  Assuming our logic would select the best-scoring values when searching for “Watson”, it would select the incorrect value of Son.</p>
<p>All this indicates that the Jaccard algorithm is not the best-suited one for our situation.</p>
<p>So, what about <strong>Jaro-Winkler</strong>?</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image371.png"><img style="display: inline; border: 0px;" title="Results for the Jaro-Winkler algorithm" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb86.png" border="0" alt="Results for the Jaro-Winkler algorithm" width="700" height="176" /></a></p>
<p>In this case we’ve got even higher maximum values compared to Levenshtein and the two values for Washington are located on top.  So far so good.  The correct value for Watson is located at position 7.  But as you can see, this is the first match for Zqtson, which means that the correct value would get selected by our matching logic.  Based on these numbers I would say that so far this is the best algorithm for the situation.</p>
<p>One more to go: <strong>Longest Common Subsequence</strong>.</p>
<p><img style="display: inline; border: 0px;" title="Results for the Longest Common Subsequence algorithm" src="http://blog.hoegaerden.be/wp-content/uploads/image372.png" border="0" alt="Results for the Longest Common Subsequence algorithm" width="700" height="116" /></p>
<p>Again the three correct values are located on top, just like the Levenshtein algorithm.  In fact, the calculated scores are very similar to the Levenshtein algorithm.  Quite logical: both calculations are using similar algorithms.</p>
<h2>Conclusion</h2>
<p>Based on the results above and using this very limited sample data set, I would select the Jaro-Winkler algorithm as being the most suitable for our situation.  But I do have to mention that you should really use larger data sets to be sure.</p>
<p>Also, even though we can rely on a fuzzy-logic algorithm to find the correct match, the selected matches should be verified and approved manually.  Of course, all that can be part of a Master Data Management process.</p>
<p>Note that for this post I only looked at fuzzy matching possibilities using just T-SQL.  In Integration Services there are a couple of components, such as the Fuzzy Lookup data flow component, that offer similar functionality.  If you’re dealing with ETL flows in SSIS, be sure to check that one out as well!</p>
<p>Have fun!</p>
<p>Valentino.</p>
<p><strong>References</strong></p>
<p><a title="ContosoDW sample database" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=868662DC-187A-4A85-B611-B7DF7DC909FC&amp;amp%3Bdisplaylang=en" target="_blank">Microsoft Contoso BI Demo Dataset for Retail Industry</a></p>
<p><a title="Fuzzy String Searching" href="http://en.wikipedia.org/wiki/Fuzzy_string_searching" target="_blank">Fuzzy String Searching</a></p>
<p><a title="Soundex" href="http://en.wikipedia.org/wiki/Soundex" target="_blank">Soundex algorithm</a></p>
<p><a title="Levenshtein distance" href="http://en.wikipedia.org/wiki/Levenshtein_distance" target="_blank">Levenshtein Distance</a></p>
<p><a title="Jaccard index" href="http://en.wikipedia.org/wiki/Jaccard_index" target="_blank">Jaccard Index</a></p>
<p><a title="Jaro–Winkler distance" href="http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance" target="_blank">Jaro-Winkler Distance</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2011%2F02%2F05%2Ffinding-similar-strings-with-fuzzy-logic-functions-built-into-mds%2F&amp;title=Finding%20Similar%20Strings%20With%20Fuzzy%20Logic%20Functions%20Built%20Into%20MDS" id="wpa2a_4"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2011/02/05/finding-similar-strings-with-fuzzy-logic-functions-built-into-mds/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IIS 7.5 And Windows Authentication</title>
		<link>http://blog.hoegaerden.be/2010/02/14/iis-7-5-and-windows-authentication/</link>
		<comments>http://blog.hoegaerden.be/2010/02/14/iis-7-5-and-windows-authentication/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 10:34:33 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[IIS 7.5]]></category>
		<category><![CDATA[Master Data Services]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/02/14/iis-7-5-and-windows-authentication/</guid>
		<description><![CDATA[Owkay, I’ve got a good one for you this time. And all it takes is checking a checkbox, just one checkbox! That’s the solution to a problem with which I’ve been struggling yesterday.&#160; What problem?&#160; Let me tell you. I’ve been installing Master Data Services (MDS) on my SQL Server 2008 R2.&#160; This feature will [...]]]></description>
			<content:encoded><![CDATA[<p>Owkay, I’ve got a good one for you this time.</p>
<blockquote><p>And all it takes is checking a checkbox, just one checkbox!</p>
</blockquote>
<p>That’s the solution to a problem with which I’ve been struggling yesterday.&#160; What problem?&#160; Let me tell you.</p>
<p>I’ve been installing <a title="SQL Server 2008 R2 Master Data Services" href="http://www.microsoft.com/sqlserver/2008/en/us/mds.aspx" target="_blank">Master Data Services</a> (MDS) on my SQL Server 2008 R2.&#160; This feature will not only create a database but also a website which you can use to manage MDS.&#160; And it’s the website part that I had a problem with.&#160; Everything installed just fine but when I tried to load the site in Internet Explorer 8 on my Windows 7 64-bit machine, I got the following error:</p>
<blockquote><p>HTTP Error 401.2 – Unauthorized</p>
<p>You are not authorized to view this page due to invalid authentication headers.</p>
</blockquote>
<p>Great, an authentication problem &#8211; aren&#8217;t those our favorite ones?&#160; And like any decent developer, I didn’t waste my time reading all the text on the error page and started investigating the issue.&#160; I had a look at the settings of the Application Pool and those of the Default Web Site.&#160; I also tried changing the security settings in IE.&#160; At the end I think I have tried every possible setting in <a title="Installing IIS 7.5 on Windows 7 Professional, Enterprise, or Ultimate" href="http://technet.microsoft.com/en-us/library/cc725762.aspx" target="_blank">IIS 7.5</a> (which is the version that ships with Windows 7), but I kept getting that same error.</p>
<p>I let some time pass (not on purpose but because we were going to visit my parents-in-law) and in the evening I decided to have another look.&#160; This time I took the effort of reading everything mentioned in the error:</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image183.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="HTTP Error 401.2 - Unauthorized" border="0" alt="HTTP Error 401.2 - Unauthorized" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb53.png" width="657" height="582" /></a></p>
<p>Do you see that blue link down at the bottom, which I’ve marked with a red rectangle?&#160; That’s where I got the answer from!&#160; Clicking it opened up the following Microsoft Support page: <a title="Error message when you try to visit a Web page that is hosted on IIS 7.0: &quot;HTTP Error 401.2 - Unauthorized&quot;" href="http://support.microsoft.com/kb/942043/" target="_blank">Error message when you try to visit a Web page that is hosted on IIS 7.0: &quot;HTTP Error 401.2 &#8211; Unauthorized&quot;</a>.</p>
<p>Sounds familiar doesn’t it?&#160; Okay, it’s meant for IIS 7.0 but works for 7.5 as well.</p>
<p>I solved my problem by applying Resolution 1.&#160; In short: IIS was running without the Windows Authentication module installed!&#160; Apparently that is not installed by default when you activate Internet Information Services through the “Turn Windows features on or off” window.&#160; Here’s a screenshot showing what needs to be added:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Activating Windows Authentication for IIS 7.5 in Windows 7" border="0" alt="Activating Windows Authentication for IIS 7.5 in Windows 7" src="http://blog.hoegaerden.be/wp-content/uploads/image184.png" width="660" height="653" /></p>
<p>Once that was set up I was able to load the MDS application:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Master Data Services Home Page" border="0" alt="Master Data Services Home Page" src="http://blog.hoegaerden.be/wp-content/uploads/image185.png" width="627" height="598" /></p>
<p>If you’re looking for instructions on how to install and configure Master Data Services, have a look at <a title="Installing and Configuring Master Data Services 2008 R2 November CTP" href="http://sqlblog.com/blogs/mds_team/archive/2009/12/10/installing-and-configuring-master-data-services-2008-r2-november-ctp.aspx" target="_blank">this article at the Master Data Services Team blog</a>.</p>
<p>(Do I need to mention that this was the first-ever web application that I tried running on Windows 7? <img src='http://blog.hoegaerden.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
<p>Have fun!</p>
<p>Valentino.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F02%2F14%2Fiis-7-5-and-windows-authentication%2F&amp;title=IIS%207.5%20And%20Windows%20Authentication" id="wpa2a_6"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/02/14/iis-7-5-and-windows-authentication/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

