<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CSS SQL Server Engineers</title><link>http://blogs.msdn.com/b/psssql/</link><description>This is the official team Web Log for Microsoft Customer Service and Support (CSS) SQL Support. Posts are provided by the CSS SQL Escalation Services team.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>High CPU Troubleshooting with DMV Queries</title><link>http://blogs.msdn.com/b/psssql/archive/2013/06/17/high-cpu-troubleshooting-with-dmv-queries.aspx</link><pubDate>Mon, 17 Jun 2013 20:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10426523</guid><dc:creator>psssql</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10426523</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/06/17/high-cpu-troubleshooting-with-dmv-queries.aspx#comments</comments><description>&lt;h1&gt;High CPU Troubleshooting with DMV Queries&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Scenario:&lt;/h2&gt;
&lt;p&gt;Recently, a customer called Microsoft Support with a critical performance issue that I worked on. Their SQL Server instance had 100% CPU utilization for a period, but the problem stopped without any action taken&lt;br /&gt;by the customer. By the time I was engaged, the issue was no longer occurring. Very often we use PSSDiag to gather data related to performance issues, but we cannot gather trace data with PSSDiag&lt;br /&gt;after the fact. XEvents will also not reveal anything.&lt;/p&gt;
&lt;p&gt;PSSDiag will gather other details like top CPU queries that will be useful after the problem has ceased. In this case, we reviewed the execution plans that consumed the most CPU by using DMVs like sys.dm_exec_query_stats.&lt;/p&gt;
&lt;h2&gt;Troubleshooting:&lt;/h2&gt;
&lt;p&gt;In my discussion with the customer, he was made aware of the problem and started to investigate it, but the problem seemed to resolve itself. When I was engaged on the call, the issue had been over for 2 hours. I asked if the server had been restarted and found that it had not. This raised the possibility that the execution plan of the queries and procedures that had driven CPU were still in the cache. In that case, we can run&amp;nbsp;queries against sys.dm_exec_query_stats to review those queries and procedures as well as their execution plans.&lt;/p&gt;
&lt;h3&gt;Sys.dm_exec_query_stats Query:&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;s an example (and the attached file has the script as well):&lt;/p&gt;
&lt;p&gt;--Run the following query to get the TOP 50 cached plans that consumed the most cumulative CPU All times are in microseconds&lt;/p&gt;
&lt;p&gt;SELECT TOP 50 qs.creation_time, qs.execution_count, qs.total_worker_time as total_cpu_time, qs.max_worker_time as max_cpu_time, qs.total_elapsed_time, qs.max_elapsed_time, qs.total_logical_reads, qs.max_logical_reads, qs.total_physical_reads, qs.max_physical_reads,t.[text], qp.query_plan, t.dbid, t.objectid, t.encrypted, qs.plan_handle, qs.plan_generation_num FROM sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS t CROSS APPLY sys.dm_exec_query_plan(plan_handle) AS qp ORDER BY qs.total_worker_time DESC&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/b/psssql/archive/2013/06/17/high-cpu-troubleshooting-with-dmv-queries.aspx"&gt;(Please visit the site to view this video)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Many variants of this query can be found which retrieve the stats (reads, CPU, executions) for execution plans from sys.dm_exec_query_stats() and the text of the query from sys.dm_exec_sql_text. To this template, I added sys.dm_exec_query_plan() to also provide the graphical execution plan. This query puts the results in order by total CPU usage.&lt;/p&gt;
&lt;p&gt;This is not necessarily an exhaustive list. If a query is recompiled the details for that plan are removed; if there are further executions later, its cumulative stats in sys.dm_exec_query_stats start off at zero. If the procedure cache is flushed or SQL Server is restarted, all plans will be similarly affected.&lt;/p&gt;
&lt;p&gt;After running this query with my customer, we saw that there were about five queries that were noticeably higher in total CPU than the rest.&lt;/p&gt;
&lt;h3&gt;Reviewing Execution Plans:&lt;/h3&gt;
&lt;p&gt;Once we identified the highest CPU consumers, we started reviewing their execution plan by clicking on the link in our results.** There are a number of items to look for in any execution plan that could indicate where performance can be improved:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;High cost operations&lt;/li&gt;
&lt;li&gt;Index scans&lt;/li&gt;
&lt;li&gt;Multiple executions of scans/seeks&lt;/li&gt;
&lt;li&gt;Bookmark Lookups&lt;/li&gt;
&lt;li&gt;Operations with very high rowcount&lt;/li&gt;
&lt;li&gt;Sort operations&lt;/li&gt;
&lt;li&gt;Implicit conversions&lt;/li&gt;
&lt;li&gt;Estimated rows/executions that do not match actual rows/executions (which could indicated out of date statistics)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this case, we found the execution plans for each didn&amp;rsquo;t have obvious red flags, like expensive scans. So, we reviewed the index seeks with higher costs. We reviewed the queries to see what columns were used in the WHERE and JOIN clauses. Using sp_help against the tables, we looked at the existing indexes and found that the indexes seemed to support these queries relatively well.&lt;/p&gt;
&lt;h3&gt;Statistics:&lt;/h3&gt;
&lt;p&gt;Since the indexes appeared to support the queries, I decided to take another step and check statistics on these tables using &lt;a href="http://msdn.microsoft.com/en-us/library/ms174384.aspx"&gt;DBCC SHOWSTATISTICS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the first several queries from our high CPU output, we checked the statistics on any indexes that seemed relevant. The most important&lt;br /&gt;parts of the statistics output are the &amp;ldquo;All Density&amp;rdquo; value, the &amp;ldquo;Rows&amp;rdquo; and&lt;br /&gt;&amp;ldquo;Rows Sampled&amp;rdquo; values, and the &amp;ldquo;Updated&amp;rdquo; value. &lt;br /&gt; &lt;br /&gt; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84/7043.DBCC_5F00_SHOW_5F00_STATISTICS.png"&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84/7043.DBCC_5F00_SHOW_5F00_STATISTICS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;Updated&amp;rdquo; value shows when the statistics were sampled. &amp;ldquo;Rows&amp;rdquo; and &amp;ldquo;Rows Sampled&amp;rdquo; allows you to determine the sampling rate; a higher sampling rate tends to lead to the statistics being more accurate and&amp;nbsp;providing better performance.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;All Density&amp;rdquo; is less direct; inverting this number (dividing 1 by the &amp;ldquo;All Density&amp;rdquo;) gives the number of unique values in the column. This is useful in determining how &lt;em&gt;unique &lt;/em&gt;an index is, and a more unique index is more likely to be used by the engine to complete a request faster.&lt;/p&gt;
&lt;p&gt;What we found in&amp;nbsp;the customer's&amp;nbsp;case was a wide variety of dates for statistics; some were 4 hours old, some were 4 days old, and some were 4 months old. After seeing this repeated on indexes related to several queries, the statistics were updated which resolved the issue.&lt;/p&gt;
&lt;h3&gt;To Summarize:&lt;/h3&gt;
&lt;p&gt;Here were the steps we took to analyze and resolve this issue.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Used query against sys.dm_exec_query_stats and sys.dm_exec_sql_text to identify highest CPU consumers&lt;/li&gt;
&lt;li&gt;Reviewed the execution plans, identified what drives the cost of the plan and operators that are typically problematic&lt;/li&gt;
&lt;li&gt;Reviewed the columns used in JOIN or WHERE clauses in the query, ensured there are indexes built on these columns&lt;/li&gt;
&lt;li&gt;Checked the statistics and updated them when we realized they were out of date.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Additional steps to consider in similar cases:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Check the SELECT list and consider if a covering index would further improve performance&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Use the cost of plans to compare old and new plans&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Tools to help identify performance issues causes and improve performance:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/ms173494(v=SQL.105).aspx"&gt;DatabaseTuning Advisor&lt;/a&gt; can use a workload or a specific query to determine if adding or modifying an index can improve the SQL Server&amp;rsquo;s performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A variant of the high CPU query and a number of other queries I use to gather data quickly are available in the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=29063"&gt;Performance Dashboard&lt;/a&gt;. This provides a graphical interface to access these queries as reports.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style="color: #888888;"&gt;Jared Poch&amp;eacute;, Sr. Support Escalation Engineer. @jpocheMS&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color: #888888;"&gt;with thanks to Jack Li and Bob Ward&lt;/span&gt;&lt;/div&gt;
&lt;hr align="left" size="1" width="33%" /&gt;
&lt;div&gt;
&lt;p&gt;**&amp;nbsp;If clicking on the link in the query opens a window with raw XML, save this&amp;nbsp;data to an .XML file. Change the file extension to .SQLPLAN, then open the file in SQL Server Management Studio to view the graphical plan.&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10426523" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-42-65-23/HighCPU.sql" length="674" type="application/octet-stream" /><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Performance/">Performance</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Engine/">Engine</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/DMV/">DMV</category></item><item><title>A performance issue involving CLR garbage collection and SQL CPU affinity setting</title><link>http://blogs.msdn.com/b/psssql/archive/2013/06/11/a-performance-issue-involving-clr-garbage-collection-and-sql-cpu-affinity-setting.aspx</link><pubDate>Tue, 11 Jun 2013 21:20:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10425195</guid><dc:creator>JackLi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10425195</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/06/11/a-performance-issue-involving-clr-garbage-collection-and-sql-cpu-affinity-setting.aspx#comments</comments><description>&lt;p&gt;We have been troubleshooting a customer’s case and uncovered a GC behavior with SQL Server CPU affinity that is worth sharing here in a blog.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Customer reported that they had two instances of SQL Server 2008 running on a two-node cluster.&amp;#160; Let’s call them Instance1 and Instance2.&amp;#160; When they run both instances on the same node, kicking off a job on Instance1 will cause query timeouts on Instance2. The queries timed out were CLR queries via spatial usage.&lt;/p&gt;  &lt;p&gt;The node had plenty of memory for both instances.&amp;#160; Each instance had max server memory set.&amp;#160; Additionally, Instance1 and Instance2 had CPU affinity set so that they don’t overlap CPU usage.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Analysis&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The puzzle here was that Instance2 was negatively impacted by a job run by Instance1 though on the surface it shouldn’t have been.&amp;#160; The system had plenty of memory and CPU’s were divided by CPU affinity settings. When Instance1’s job was not running or running on a different node, Instance2 would work perfectly fine.&lt;/p&gt;  &lt;p&gt;We captured data such as DMV data, perfmon, userdump etc via pssdiag during problem period (when both instances ran on the same node and Instance1 kicked off the offending job).&lt;/p&gt;  &lt;p&gt;In sys.dm_exec_requests, we saw high waits on&amp;#160; CLR_MANUAL_EVENT and CLR_CRST for spatial queries which used CLR on Instance1.&amp;#160; &lt;/p&gt;  &lt;p&gt;From perfmon and userdump, we were able to see the threads were waiting for garbage collection to finish.&amp;#160;&amp;#160; When the issue occured, time spent by GC was greatly increased.&lt;/p&gt;  &lt;p&gt;For a while, we were puzzled why Instance1 would impact Instance2 by increasing it’s GC time spent.&amp;#160;&amp;#160; The system had plenty of free memory and CPU affinity was set so that two instances didn’t overlap CPU usage.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We did notice that a few CPUs affinitized to Instance1 were pegged to 100% for a long time.&amp;#160; Note that these CPUs should not have been used by Instance2 because CPU affinity was set.&amp;#160; &lt;/p&gt;  &lt;p&gt;One break-through came in when I noticed&amp;#160; that number of GC threads seemed to be odd.&amp;#160; SQL CLR uses server GC.&amp;#160;&amp;#160; For each CPU, there will be a CLR heap and GC thread created.&amp;#160;&amp;#160; What I noticed was that, even Instance1 had 16 CPUs affinitized to it, there were 64 GC threads (customer had 64 CPU on each node).&amp;#160; The same was true for Instance2 ( 64 GC threads with affinity set to 30 CPUs).&lt;/p&gt;  &lt;p&gt;Here was a little discovery:&lt;/p&gt;  &lt;p&gt;When you set CPU affinity on SQL Server,&amp;#160; it doesn’t actually set process affinity.&amp;#160; Instead the affinity is set at thread creation time to a specific CPU/scheduler.&amp;#160; Doing this way&amp;#160; will help enable dynamic CPU affinity.&lt;/p&gt;  &lt;p&gt;But CLR initializes heaps and&amp;#160; GC threads based on process affinity.&amp;#160; It will create number of heaps and GC threads depending on the number of CPUs set by process affinity.&amp;#160; If no process affinity is set, it will create number of heaps and GC threads based machine CPU.&lt;/p&gt;  &lt;p&gt;In other words, even though Instance2 was affinitized (at SQL level) to use CPUs 16-45, some GC threads still run on CPUs 0-15 (where instance1 ran).&lt;/p&gt;  &lt;p&gt;This is where ‘interaction’ comes in.&amp;#160; Basically the CLR heaps and GC threads are not isolated at all.&amp;#160; For example, even CPU 1 was configured for Instance1, there will be one CLR heap and GC thread for Instance2 running on that CPU as well. &lt;/p&gt;  &lt;p&gt;Since there were quite a few of CPUs run by Instance1 were pegged, this caused GC threads from Instance2 to fight CPU quantum, leading to increased GC time.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion &amp;amp; Solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To summarize, if you have multiple instances of SQL Server on the same machine,&amp;#160; garbage collection from one instance may be impacted by another instance&amp;#160; even you have CPU affinity set to isolate the instances.&lt;/p&gt;  &lt;p&gt;There are a couple of things you can do:&lt;/p&gt;  &lt;p&gt;When you examine your system health, look for individual CPU utilization.&amp;#160; Any individual CPU pegged to 100% for a sustained period of time, you need to work to bring CPU down.&amp;#160; If you have a balanced resource usage, this behavior (GC thread starvation) shouldn’t happen.&amp;#160; SQL CLR has been in use since 2005, this is the first time I have seen this behavior.&lt;/p&gt;  &lt;p&gt;If you want true isolation, consider use VM (one instance per VM).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A couple of&amp;#160; additional notes:&lt;/p&gt;  &lt;p&gt;By the way, the same customer also helped uncover a situation Bob Dorr documented it in the blog titled&amp;#160; “&lt;a href="http://blogs.msdn.com/b/psssql/archive/2013/01/30/appdomain-unloading-messages-flooding-the-sql-server-error-log.aspx"&gt;AppDomain unloading messages flooding the SQL Server error log&lt;/a&gt;”&lt;/p&gt;  &lt;p&gt;Note that CLR itself has a bug that can cause GC to misbehave.&amp;#160; This is fixed in &lt;a title="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2504603" href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2504603"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;2504603&lt;/a&gt;.&amp;#160;&amp;#160; This customer was on that build.&amp;#160; If you have GC misbehavior, apply this hotfix first before doing additional troubleshooting.&amp;#160; That’s maybe all you need.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Jack Li | Senior Escalation Engineer | Microsoft SQL Server Support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10425195" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Performance/">Performance</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+CLR/">SQL CLR</category></item><item><title>Getting a SharePoint List Data Source to work with Reporting Services Native Mode</title><link>http://blogs.msdn.com/b/psssql/archive/2013/06/11/getting-a-sharepoint-list-data-source-to-work-with-reporting-services-native-mode.aspx</link><pubDate>Tue, 11 Jun 2013 20:21:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10425176</guid><dc:creator>Adam W. Saxton</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10425176</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/06/11/getting-a-sharepoint-list-data-source-to-work-with-reporting-services-native-mode.aspx#comments</comments><description>&lt;p&gt;A case came up where the user was trying to use Report Builder in a Reporting Services instance that was not integrated with SharePoint.&amp;#160; It was in Native Mode configuration.&amp;#160; They indicated that they were getting a 401 error.&amp;#160; My initial thought was that we were hitting a Kerberos issue.&amp;#160; Of note, they were trying to hit a List that was in SharePoint 2013.&amp;#160; &lt;/p&gt;  &lt;p&gt;SharePoint 2013 is defaulted to use Claims Authentication Sites.&amp;#160; So, most would probably ignore the Kerberos aspects of the SharePoint site.&amp;#160; I was able to reproduce the issue locally because I had done the same thing.&lt;/p&gt;  &lt;p&gt;I created the Data Source within Report Builder to hit my SharePoint 2013 site:&amp;#160; &lt;a href="http://capthelo/"&gt;http://capthelo/&lt;/a&gt;, and when I click on “Test Connection” within the Data Source Dialog Window, I get the following error.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4130.image_5F00_7BBDC14B.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/1524.image_5F00_thumb_5F00_6908C794.png" width="484" height="254" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;dataextension!ReportServer_0-1!9cc!06/11/2013-14:25:58:: e ERROR: Throwing Microsoft.ReportingServices.DataExtensions.SharePointList.SPDPException: , Microsoft.ReportingServices.DataExtensions.SharePointList.SPDPException: An error occurred when accessing the specified SharePoint list. The connection string might not be valid. Verify that the connection string is correct.&amp;#160; ---&amp;gt; &lt;font color="#ff0000"&gt;System.Net.WebException: The request failed with HTTP status 401: Unauthorized.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This happens because when you click “Test Connection” the connection test is actually performed on the Report Server itself not directly from Report Builder.&amp;#160; I had blogged a while back regarding &lt;a href="http://blogs.msdn.com/b/psssql/archive/2009/12/03/report-builder-and-firewalls.aspx" target="_blank"&gt;Report Builder and Firewalls&lt;/a&gt; where I talk about how some of the items in Report Builder will try to connect direction, but “Test Connection” is not one of them.&lt;/p&gt;  &lt;p&gt;At this point, we could ignore the error and hit OK on the Data Source Dialog and try and create a DataSet. When I go to the Query Designer, it appears to have worked.&amp;#160; This because the DataSets and Query Designer are coming from Report Builder itself.&amp;#160; It is a direct Web Request from the Report Builder Process and not the Report Server, so I don’t get an error.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4744.image_5F00_1374F8B2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5672.image_5F00_thumb_5F00_40F61875.png" width="459" height="481" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;However, this is misleading.&amp;#160; This may make you believe that it is working properly, but when you deploy and try to run the report, you will be back to the 401 error because we are now coming from the Report Server which will be down the same path that the original error with the “Test Connection” had.&amp;#160; From the DataSet/Query Designer perspective, this is a straight shot from Report Builder to SharePoint, so we can get away with an NTLM connection for the Web Request and the Windows Credential is valid.&amp;#160; &lt;/p&gt;  &lt;p&gt;From the Report Server, however, this is called a Double Hop and to forward Windows Credentials you need Kerberos to do that.&amp;#160;&amp;#160; Even when your SharePoint 2013 site is configured for Claims.&amp;#160; This actually has nothing to do with SharePoint, it has everything to do with Reporting Services.&amp;#160; The Report Server is the one trying to delegate the Windows Credential to whoever the receiving party is for the Web Request (or SQL Connection if that is your Data Source).&amp;#160; In this case, it is SharePoint 2013.&amp;#160; Because Kerberos isn’t configured properly, IIS (which is hosting SharePoint), received an anonymous credential for the Web Request and rejects it accordingly with a 401 error.&lt;/p&gt;  &lt;p&gt;In my case, I was using a Domain User Account for the RS Service Account (BATTLESTAR\RSService – &lt;a href="http://chieftyrol"&gt;http://chieftyrol&lt;/a&gt;).&amp;#160; It had the proper HTTP SPN on it.&amp;#160; Also my SharePoint site was using a Domain User account for the AppPool identity within IIS (BATTLESTAR\spservice – &lt;a href="http://capthelo"&gt;http://capthelo&lt;/a&gt;) and this had the proper HTTP SPN on it.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5773.image_5F00_2721E246.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/2465.image_5F00_thumb_5F00_46D0BC0E.png" width="986" height="126" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So, now I just need to verify the Delegation properties for the RSService Account. Because I’m using the RSService account for other things that includes Claims within SharePoint 2013, I’m forced to Constrained Delegation on this account and need to continue using that.&amp;#160; If you are not bound to Constrained Delegation, you could choose the option “Trust this user for delegation to any service (Kerberos Only)” which is considered Full Trust and should correct the issue.&amp;#160; If you are using Constrained Delegation, you have to add the proper service that you want to delegate to.&amp;#160; In my case that is for my SharePoint site and is http/capthelo.battlestar.local.&amp;#160; After I added it, it looked like the following.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3542.image_5F00_3F454CA1.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4478.image_5F00_thumb_5F00_1EBE0CEF.png" width="429" height="470" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Then I restarted the Reporting Services Service and created the Data Source again.&amp;#160; At that point, the “Test Connection” returned Success!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4571.image_5F00_04E9D6C0.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/2043.image_5F00_thumb_5F00_0FA72E15.png" width="546" height="309" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font color="#333333"&gt;Adam W. Saxton | Microsoft Escalation Services&lt;/font&gt;    &lt;br /&gt;&lt;a href="http://twitter.com/awsaxton"&gt;http://twitter.com/awsaxton&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10425176" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Connectivity/">Connectivity</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Reporting+Services/">Reporting Services</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Adam/">Adam</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Kerberos/">Kerberos</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint/">SharePoint</category></item><item><title>How It Works: The I/O Path: SQL Server Running in Windows Azure Virtual Machine (IaaS)</title><link>http://blogs.msdn.com/b/psssql/archive/2013/06/03/how-it-works-the-i-o-path-sql-server-running-in-windows-azure-virtual-machine-iaas.aspx</link><pubDate>Mon, 03 Jun 2013 22:11:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10423278</guid><dc:creator>psssql</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10423278</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/06/03/how-it-works-the-i-o-path-sql-server-running-in-windows-azure-virtual-machine-iaas.aspx#comments</comments><description>&lt;p&gt;&lt;font color="#c0504d"&gt;&lt;strong&gt;Note: &lt;/strong&gt;&lt;em&gt;This blog is based on behavior as of June 2013.&amp;#160; At Microsoft we continue to evolve and enhance our products so the behavior may change over time.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The I/O path for SQL Server, running on Windows Azure Virtual Machines, uses Windows Azure storage (often referred to as XStore.)&amp;#160; The following is a link to a whitepaper, written by the SQL Server development team, explaining various I/O aspects and tuning needs for this environment:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(31, 73, 125); font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa;"&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=306266"&gt;&lt;u&gt;&lt;font color="#0563c1"&gt;http://go.microsoft.com/fwlink/?LinkId=306266&lt;/font&gt;&lt;/u&gt;&lt;/a&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;I have been testing and driving workloads using SQL Server in our IaaS environment(s). Exercising test patterns from SQLIOSim, T-SQL, Tempdb stress, BCP, and the RML utility test suites.&amp;#160; This work has afforded me the opportunity to work closely with both the SQL Server and Windows Azure development teams to better understand how to tune SQL Server for a Windows IaaS deployment.&lt;/p&gt;  &lt;p&gt;The previously mentioned white paper points out many of the interactions but I would like to dive into some specific areas to help you understand your Windows Azure IaaS, SQL Server deployment capabilities and options.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Caching&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Caching happens at multiple levels (SQL Server, VHD/VHDx, XStore, …).&amp;#160;&amp;#160; SQL Server requires &lt;a href="http://www.microsoft.com/en-us/sqlserver/solutions-technologies/mission-critical-operations/io-reliability-program.aspx"&gt;stable media&lt;/a&gt; (&lt;em&gt;data retained across power outages&lt;/em&gt;) in order to uphold the ACID properties of the database.&amp;#160; It should not surprise you that I spent a fair amount of time understanding the various caches and how SQL Server I/O patterns interact with them from both data safety/stability and performance angles.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Server Data and Log Files: FILE_FLAG_WRITETHROUGH/Forced Unit Access (FUA) Writes&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;SQL Server does all database and log file writes (including TEMPDB) forcing write though.&amp;#160; This means the system is not allowed to return the success of a WriteFile* operation until the system guarantees the data has been stored in stable media.&amp;#160; This is regardless of the cache settings at any level of the system.&amp;#160; The data must be stored in a cache that is battery backed or written to physical media that will survive a power outage.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Server Backups&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When performing a backup SQL Server does NOT set the FILE_FLAG_WRITETHOUGH, instead the backup allows caching of the data to take place.&amp;#160;&amp;#160; When backup has written all of the data it issues the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439(v=vs.85).aspx"&gt;FlushFileBuffers&lt;/a&gt; command on the backup file(s).&amp;#160; This acts like FUA in that the FlushFileBuffers must guarantee all data stored in cache has been written to stable media before returning success from the API.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Other Files&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are other files such as the SQL Server error log, BCP output, … that a SQL Server deployment will use.&amp;#160; These usually do NOT use FILE_FLAG_WRITETHROUGH nor FlushFileBuffers.&amp;#160;&amp;#160; This behavior is not unique to Windows IaaS it has been the design and implementation for many releases of the SQL Server product.&amp;#160;&amp;#160; I am only mentioning this because it can make a difference to you as to where you store the data or leverage various caching mechanisms.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Drive: VHD/VHDx Cache (Drive Caching)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The first level of caching appears at the drive level.&amp;#160;&amp;#160; Accessing the drive’s properties exposes the drive level caching policy.&amp;#160;&amp;#160; When enabled the drive is allowed to cache data within the physical drive cache (for physical disks) and virtual implementations.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6825.image_5F00_76CE3E49.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6443.image_5F00_thumb_5F00_0F5DDB9A.png" width="323" height="191" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Drive: XStore Caching&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The virtual disks attached to your Windows IaaS VM are stored in Windows Azure storage (the XStore.)&amp;#160;&amp;#160; The XStore provides host level caching and performance optimizations for your VM.&amp;#160;&amp;#160; XStore caching is controlled outside of the individual drive cache settings, previously shown.&amp;#160;&amp;#160; (&lt;em&gt;Drive level cache settings do not impact the XStore cache settings&lt;/em&gt;.)&lt;/p&gt;  &lt;p&gt;There are three cache settings (&lt;strong&gt;None&lt;/strong&gt;, &lt;strong&gt;ReadOnly&lt;/strong&gt;, &lt;strong&gt;ReadWrite&lt;/strong&gt;) for the XStore.&amp;#160; By default a data disk is set to NONE and an OS Disk is set to Read Write.&amp;#160;&amp;#160; The data disk can be configured to any of the 3 settings while an OS disk is limited to the Read Only or Read Write options.&lt;/p&gt;  &lt;p&gt;To alter the XStore cache settings you must use a command such as the following:&amp;#160; (The cmdlet’s are part of the Windows &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj152841.aspx"&gt;Azure Management cmdlets&lt;/a&gt; package.)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: rgb(31, 73, 125); font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; mso-bidi-font-size: 11.0pt;"&gt;get-azurevm 'TestSub' 'TestMach' | &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj152847.aspx"&gt;set-azureosdisk&lt;/a&gt; -HostCaching &amp;quot;ReadOnly&amp;quot; | update-azurevm&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font color="#c0504d"&gt;&lt;strong&gt;Note: &lt;/strong&gt;The configuration change does not take place until the VM is restarted.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;You will find that most documentation points to the use of one or more data drives for SQL Server database and log files and I agree with this assessment but I would like to explain a bit more as to why I agree.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;OS Drive Default: Read Write&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To understand the recommendation it helps to understand a bit of how the XStore cache is implemented.&amp;#160;&amp;#160;&amp;#160; The XStore cache can use a combination of the host’s RAM as well as disk space, on the local host to support the cache.&amp;#160;&amp;#160; When a read or write takes place the local cache is consulted.&amp;#160; As you can imagine, the local cache can be faster than making a request to the Windows Azure storage cluster.&amp;#160; To see this in action it helps if I show you some high level scenarios.&lt;/p&gt;  &lt;p&gt;&lt;font color="#c0504d"&gt;&lt;strong&gt;Note:&amp;#160; &lt;/strong&gt;These scenarios are designed to provide you a 10,000 foot view of the architecture.&lt;/font&gt;&lt;/p&gt; &lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;  &lt;table cellspacing="0" cellpadding="2" width="651" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="87"&gt;&lt;strong&gt;Action&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="71"&gt;&lt;strong&gt;FUA&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="70"&gt;&lt;strong&gt;XStore Read Cache&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="72"&gt;&lt;strong&gt;XStore Write Cache&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="349"&gt;&lt;strong&gt;Outcome&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="92"&gt;WriteFile*&lt;/td&gt;        &lt;td valign="top" width="75"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="74"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="76"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="336"&gt;         &lt;ul&gt;           &lt;li&gt;Is covering block in XStore write cache&amp;#160; (No)&lt;/li&gt;            &lt;li&gt;Obtain cache block (could require &lt;strong&gt;write&lt;/strong&gt; of an older block to XStore before reuse is allowed)&lt;/li&gt;            &lt;li&gt;Issue XStore &lt;strong&gt;read&lt;/strong&gt; for block ~512K and store in local cache (&lt;strong&gt;write&lt;/strong&gt;)&lt;/li&gt;            &lt;li&gt;Do original &lt;strong&gt;write&lt;/strong&gt; to local cache&lt;/li&gt;            &lt;li&gt;Do original &lt;strong&gt;write&lt;/strong&gt; to XStore&lt;/li&gt;         &lt;/ul&gt;          &lt;p&gt;Data is written all the way to the XStore (stable media.)&amp;#160; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="95"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="77"&gt;No&lt;/td&gt;        &lt;td valign="top" width="77"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="79"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="329"&gt;         &lt;ul&gt;           &lt;li&gt;Is covering block in XStore write cache&amp;#160; (No)&lt;/li&gt;            &lt;li&gt;Obtain cache block (could require &lt;strong&gt;write&lt;/strong&gt; of an older block to XStore before reuse is allowed)&lt;/li&gt;            &lt;li&gt;Issue XStore &lt;strong&gt;read&lt;/strong&gt; for block ~512K and store in local cache (&lt;strong&gt;write&lt;/strong&gt;)&lt;/li&gt;            &lt;li&gt;Do original &lt;strong&gt;write&lt;/strong&gt; to local cache&lt;/li&gt;         &lt;/ul&gt;          &lt;p&gt;Data is NOT in stable media, will be written by XStore caching, LRU algorithms.&amp;#160;&amp;#160; This is not used by the SQL Server database or log files because FUA=YES but BCP out is a usage example.&amp;#160;&amp;#160; This may be helpful because the BCP can leverage the cache and allow the cache to optimally send data to the XStore.            &lt;br /&gt;            &lt;br /&gt;Note:&amp;#160; For temporary files, such as BCP not TEMPDB, you may consider the (D:) scratch drive, provided.&amp;#160; It is local and no XStore caching is involved.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="97"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="77"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="79"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="81"&gt;No&lt;/td&gt;        &lt;td valign="top" width="326"&gt;The write is propagated directly to the XStore.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="98"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="77"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="81"&gt;No&lt;/td&gt;        &lt;td valign="top" width="82"&gt;No&lt;/td&gt;        &lt;td valign="top" width="324"&gt;The write is propagated directly to the XStore.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="99"&gt;ReadFile*&lt;/td&gt;        &lt;td valign="top" width="76"&gt;N/A&lt;/td&gt;        &lt;td valign="top" width="82"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="83"&gt;Yes&lt;/td&gt;        &lt;td valign="top" width="322"&gt;         &lt;ul&gt;           &lt;li&gt;Is covering block in XStore read cache&amp;#160; (No)&lt;/li&gt;            &lt;li&gt;Obtain cache block (could require &lt;strong&gt;reclaim &lt;/strong&gt;of an older block before reuse is allowed)&lt;/li&gt;            &lt;li&gt;Issue XStore &lt;strong&gt;read&lt;/strong&gt; for block ~512K and store in local cache (&lt;strong&gt;write&lt;/strong&gt;)&lt;/li&gt;            &lt;li&gt;Provide portion of block requested to reader&lt;/li&gt;         &lt;/ul&gt;          &lt;p&gt;If the block is present in the read cache the portion of the block requested to the reader is directly serviced.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;p&gt;The SQL Server use cases become more clear once you understand the XStore caching behavior and combine it with SQL Server caching behavior.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Server Log File&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The log file is typically a serially moving, write only entity.&amp;#160;&amp;#160; SQL Server maintains a cache of log block to avoid physical I/O for actions such as a transaction rollback or provide data to Always On, Database Mirroring, Replication, …&amp;#160;&amp;#160; If you place the log on a drive that allows XStore write caching you are seldom taking advantage of the write cache.&amp;#160;&amp;#160; First the log is written with FUA enabled so a write has to go though the cache, all the way to the XStore.&amp;#160; Secondly, since the log has a much higher ratio of writes to reads you are likely not using the XStore cache effectively but forcing local XStore cache writes for every backend, FUA XStore write.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Server Data File&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The data file is opened with FUA enabled and the SQL Server uses a large buffer pool to maintain database pages in cache.&amp;#160; The larger your VM size the more buffer pool cache SQL Server can take advantage of, avoiding physical I/O activities.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;The same write behavior is true for database pages as described in the log section above.&amp;#160;&amp;#160; When you then apply the XStore read cache capabilities, they may not be performance improving over what SQL Server is already caching in buffer pool.&amp;#160;&amp;#160; As shown in the scenario table a read, via XStore read cache enablement, can result in a fetch of a larger block into the local XStore read cache.&amp;#160;&amp;#160; This could be helpful for subsequent SQL Server read requests but you also incur a possible write to the local XStore cache to maintain the data in the XStore cache.&amp;#160; Your application read pattern may also be sporadic and defeat the intent of the XStore read cache.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;BCP Out &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You may get an advantage of writing to a XStore, write enabled drive by allowing the XStore to cache and optimially flush information to the backend store.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;BCP In &lt;/strong&gt;&lt;/p&gt;  This is one of the tests that the XStore read cache improved performance for.&amp;#160;&amp;#160; The read ahead action of the larger blocks used by the XStore allowed the streaming of the read bytes to be faster than from a XStore drive with read caching disabled.&amp;#160;&amp;#160; &lt;p&gt;&lt;strong&gt;TEMPDB Scratch Drive – No Thanks&lt;/strong&gt;&lt;/p&gt; &lt;strong&gt;&lt;/strong&gt;  &lt;p&gt;It can be a bit confusing that you have a (D: scratch) drive so why not use it for TEMPDB.&amp;#160; The reason is that scratch drive is a shared resource between all VMs on the host.&amp;#160;&amp;#160; You are given a sandbox drive in the VM so others can’t see your data and you can’t see theirs but the physical media is shared.&amp;#160;&amp;#160; While the system attempts to avoid it, it does mean a noisy neighbor could impact consistent I/O throughput on the scratch drive and change your performance predictability.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Replicas of Data&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The Windows Storage for the VHDs atomically replicates your data to 3 separate, physical media destinations.&amp;#160; This is done during the write request in a way that the write is assured quorum to the devices before the write is considered complete, proving your VHDs with a high degree of data storage safety.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Remote Replicas (Geo-Replication)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The default for the VHD storage is to provide 3 local replicas of the data.&amp;#160; A remote replica can also be established.&amp;#160;&amp;#160; The remote replica is currently NOT safe for SQL Server use.&amp;#160; The remote replica is maintained asynchronously and the system, currently, does not provide the ability to group VHDs into a consistency group.&amp;#160; Without consistency groups it is unsafe to assume SQL Server, with files on multiple VHDs maintain the write ordering across all the VHDs and as such the database won’t be recoverable.&lt;/p&gt;  &lt;p&gt;At the current time you should not leverage the remote, Windows Azure storage replication capabilities for SQL Server as it is not supported.&amp;#160;&amp;#160; You should leverage SQL Server technologies that provide the capability (Always On, Database Mirroring, Log Shipping, Backup to Blob Storage, …)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Recap / Recommendation&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;What am I trying to say? – &lt;em&gt;Test!&lt;/em&gt;&amp;#160; As pointed out in the SQL Server whitepaper, the XStore is perfectly safe for SQL Server ACID requirements.&amp;#160;&amp;#160; However, the types of I/O pattern(s) your application(s) drive dictate how you can leverage the XStore caching capabilities.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;font color="#000000" size="3"&gt;Most implementations start with the SQL Server database and log files on a data drive, XStore caching disabled and only after testing enable various levels of XStore, caching behavior.&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; &lt;strong&gt;&lt;font color="#00ff00"&gt;&lt;/font&gt;&lt;/strong&gt;  &lt;p&gt;&lt;span style="color: rgb(166, 166, 166); font-size: 8pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;"&gt;&lt;font face="Calibri"&gt;Bob Dorr - &lt;/font&gt;&lt;font face="Calibri"&gt; Principal SQL Server Escalation Engineer &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10423278" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/How+It+Works/">How It Works</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/2008/">2008</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+2008/">SQL 2008</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/2008+R2/">2008 R2</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+Azure/">SQL Azure</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+2012/">SQL 2012</category></item><item><title>Why won't my PowerPivot for Excel 2010 workbook upgrade to Excel 2013?</title><link>http://blogs.msdn.com/b/psssql/archive/2013/05/23/why-won-t-my-powerpivot-for-excel-2010-workbook-upgrade-to-excel-2013.aspx</link><pubDate>Thu, 23 May 2013 17:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10420965</guid><dc:creator>psssql</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10420965</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/05/23/why-won-t-my-powerpivot-for-excel-2010-workbook-upgrade-to-excel-2013.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Recently we've seen an issue where some Excel 2010 workbooks containing PowerPivot models encounter errors when attempting to upgrade to Excel 2013.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;When opening a PowerPivot model that was created in Excel 2010 in Excel 2013 you will be prompted to upgrade with the following message:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span style="color: #000000;"&gt;&lt;strong&gt;&lt;span style="font-family: terminal,monaco;"&gt;This workbook has a PowerPivot data model created using a previous version of &lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000000;"&gt;&lt;strong&gt;&lt;span style="font-family: terminal,monaco;"&gt;the PowerPivot add-in. You will need to upgrade this data model with PowerPivot &lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000000;"&gt;&lt;strong&gt;&lt;span style="font-family: terminal,monaco;"&gt;for Excel 2013.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;After clicking OK to upgrade to model&amp;nbsp;the following error message is&amp;nbsp;displayed:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;============================&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;Error Message:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;============================&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;The handle is invalid&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;----------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;The '' local cube file cannot be opened.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;----------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;A connection cannot be made. Ensure that the server is running.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;----------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;Sorry, PowerPivot couldn't connect to server A connection cannot be made. Ensure that the server is running..&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;============================&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-family: terminal,monaco;"&gt;Call &lt;/span&gt;&lt;span style="font-family: terminal,monaco;"&gt;Stack:&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;============================&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.LocalCubeStream..ctor(String cubeFile, OpenFlags settings, Int32 timeout, String password, String serverName)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;----------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.LocalCubeStream..ctor(String cubeFile, OpenFlags settings, Int32 timeout, String password, String serverName)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.XmlaClient.OpenLocalCubeConnection(ConnectionInfo connectionInfo)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean&amp;amp; isSessionTokenNeeded)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;----------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.AnalysisServices.BackEnd.DataModelingSandboxConnection.OpenAMOConnection()&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;----------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at Microsoft.AnalysisServices.BackEnd.DataModelingSandboxConnection.OpenAMOConnection()&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at Microsoft.AnalysisServices.BackEnd.DataModelingSandboxConnection.Open()&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at Microsoft.Office.PowerPivot.ExcelAddIn.InProcServer.LoadSandboxAfterConnection(String errorCache)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.PowerPivot.ExcelAddIn.InProcServer.LoadSafeSandboxAfterConnection(String errorCache)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.PowerPivot.ExcelAddIn.InProcServer.LoadOLEDBConnection(Boolean raiseCompleteEvent, String errorCache)&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;&lt;span style="color: #000000; font-family: terminal,monaco;"&gt;============================&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;This&amp;nbsp;issue occurs when a Pivot Table in the workbook has an invalid set or calculated field definition.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;When the attempt to upgrade begins, Excel opens the PowerPivot model and executes the commands in the pivotcache for the pivot tables in the workbook,&amp;nbsp;including creating session sets or calculated items. If a definition contains an error then the embedded PowerPivot engine returns an error and Excel disconnects from the PowerPivot embedded engine, returning the message saying the server connection could not be opened.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;We are working with the Excel team to address this issue, but for now one option to work around this problem is to use the following steps:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Open the workbook in Excel 2010&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Click on a PivotTable&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;In the PivotTable Tools, Options, menu click on the "Fields, Items, and Sets" button and choose Manage Sets.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Delete any invalid set definitions.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Save the file then open it in Excel 2013.&amp;nbsp; It should upgrade successfully.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;-Wayne Robertson&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10420965" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/PowerPivot/">PowerPivot</category></item><item><title>SharePoint Adventures : Claims, Named Pipes and Kerberos</title><link>http://blogs.msdn.com/b/psssql/archive/2013/05/17/sharepoint-adventures-claims-named-pipes-and-kerberos.aspx</link><pubDate>Fri, 17 May 2013 21:17:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10419751</guid><dc:creator>Adam W. Saxton</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10419751</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/05/17/sharepoint-adventures-claims-named-pipes-and-kerberos.aspx#comments</comments><description>&lt;p&gt;I ran into a new Kerberos Scenario that I hadn’t hit before when I was working on the cases related to this &lt;a href="http://blogs.msdn.com/b/psssql/archive/2013/05/17/sharepoint-adventures-when-connectivity-is-not-connectivity.aspx" target="_blank"&gt;blog post&lt;/a&gt;. It’s rare that I actually see a case related to the Named Pipes protocol.&amp;#160; When I do, it is usually a customer trying to get it setup with a Cluster deployment.&amp;#160; I have never had a Named Pipes case related to Kerberos.&amp;#160; On top of that, I’ve never had a SQL related Kerberos issue that looked like an actual network related issue.&amp;#160; I usually see a traditional “Login failed for user” type error from the SQL Server itself.&lt;/p&gt;  &lt;p&gt;As part of my troubleshooting for the other blog post with the Claims configuration, I stumbled upon some information and theories about how Named Pipes responds when Kerberos is in the picture that I hadn’t ever seen or dealt with before.&amp;#160; I love when I see new things! It is very humbling and always reminds me there are a lot of things that I don’t know.&amp;#160; And, if you have read my other blog posts, or have seen me present at conferences like &lt;a href="http://www.sqlpass.org" target="_blank"&gt;PASS&lt;/a&gt;, you know I have a passion for Kerberos! &lt;/p&gt;  &lt;p&gt;Here is what I saw from an error perspective using SharePoint 2013 and Reporting Services 2012 SP1.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/2450.image_5F00_321159E3.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/8712.image_5F00_thumb_5F00_6D64BFA1.png" width="353" height="229" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;System.Data.SqlClient.&lt;font color="#ff0000"&gt;SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)&lt;/font&gt; ---&amp;gt; System.ComponentModel.&lt;font color="#ff0000"&gt;Win32Exception: &lt;font style="background-color: #ffff00"&gt;Access is denied&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This is a typical error if we can’t connect to SQL.&amp;#160; Think of this like a “Server doesn’t exist” type error.&amp;#160; We didn’t get the normal “Login failed for user” error that would possibly point towards Kerberos.&amp;#160; In this error, we didn’t even make it to SQL.&amp;#160; The interesting piece here though is the “&lt;font style="background-color: #ffff00"&gt;Access is denied&lt;/font&gt;” inner exception.&amp;#160; That does possibly point to a permission issue.&amp;#160; &lt;/p&gt;  &lt;p&gt;I had talked in the last Blog Post about protocol order with connecting to SQL and that the default was TCP.&amp;#160; In this case, I was forcing Named Pipes, so the fact that the error is a Named Pipes error is expected.&lt;/p&gt;  &lt;p&gt;I dropped down to a network trace to see how far we actually got and to see if that revealed any other information.&amp;#160; One thing to keep in mind here is that we are in a Claims to Windows Token Service (C2WTS) scenario with the SharePoint/RS 2012 integration.&amp;#160; So, Kerberos/Constrained Delegation will be in the picture here.&amp;#160; A lot of people aren’t necessarily familiar with how Named Pipes actually works.&amp;#160; Named Pipes actually uses the SMB (simple message block) protocol from a network perspective.&amp;#160; This is the same protocol used for file shares and you’ll see the traffic on port 445.&amp;#160; It can be a little confusing because SMB sits on top of TCP, but we aren’t actually using the TCP 1433 port.&amp;#160; It is just a different way to connect to SQL Server. The IP 10.0.0.20 was the SharePoint Server hosting the Reporting Services Service.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;300&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; SMB&amp;#160;&amp;#160;&amp;#160; SMB:C; Negotiate, Dialect = PC NETWORK PROGRAM 1.0, LANMAN1.0, Windows for Workgroups 3.1a, LM1.2X002, LANMAN2.1, NT LM 0.12, SMB 2.002, SMB 2.???&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;302&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:R&amp;#160;&amp;#160; NEGOTIATE (0x0), Revision: (0x2ff) - SMB2 wildcard revision number., ServerGUID={97B805C2-296C-477B-82B4-DEB6170A2A01} Authentication Method: GSSAPI,&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;303&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:C&amp;#160;&amp;#160; NEGOTIATE (0x0), ClientGUID= {9CB563F9-BEF4-11E2-9403-00155D4CB97B},&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;304&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:R&amp;#160;&amp;#160; NEGOTIATE (0x0), Revision: (0x300) - SMB 3.0 dialect revision number., ServerGUID={97B805C2-296C-477B-82B4-DEB6170A2A01} Authentication Method: GSSAPI,&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;323&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:C&amp;#160;&amp;#160; SESSION SETUP (0x1) Authentication Method: GSSAPI,&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;326&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:R&amp;#160; - NT Status: System - Error, Code = (22) STATUS_MORE_PROCESSING_REQUIRED&amp;#160; SESSION SETUP (0x1), SessionFlags=0x0 Authentication Method: GSSAPI,&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;327&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:C&amp;#160;&amp;#160; SESSION SETUP (0x1) &lt;font style="background-color: #ffff00"&gt;Authentication Method: GSSAPI&lt;/font&gt;,&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; - ResponseToken: NTLM AUTHENTICATE MESSAGE Version:&lt;font style="background-color: #ffff00"&gt;NTLM v2&lt;/font&gt;, Workstation: CAPTHELO         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Signature: &lt;font style="background-color: #ffff00"&gt;NTLMSSP&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;328&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; SMB2&amp;#160;&amp;#160;&amp;#160; SMB2:R&amp;#160; - NT Status: System - &lt;font color="#ff0000"&gt;Error&lt;/font&gt;, &lt;font color="#ff0000"&gt;Code = (34) STATUS_ACCESS_DENIED&lt;/font&gt;&amp;#160; SESSION SETUP (0x1) ,&amp;#160;&amp;#160;&amp;#160;&amp;#160; {SMBOverTCP:42, TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;329&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; captthrace.battlestar.local&amp;#160;&amp;#160;&amp;#160; TCP&amp;#160;&amp;#160;&amp;#160; TCP:Flags=...A.R.., SrcPort=49665, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=2945236632, Ack=2852397926, Win=0 (scale factor 0x8) = 0&amp;#160;&amp;#160;&amp;#160; {TCP:41, IPv4:1}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In the Network Trace we can see that we were trying to connect via NTLM.&amp;#160; I already know that that will be a problem as we have to go Kerberos.&amp;#160; We started supporting Kerberos with Named Pipes starting in SQL 2008, so it should work. At this point, I’m thinking we actually have a Kerberos issue even though it looked like a network issue from the original error message.&amp;#160; So, lets go see if we can validate that.&amp;#160; I already had &lt;a href="http://support.microsoft.com/kb/262177" target="_blank"&gt;Kerberos Event Logging&lt;/a&gt; enabled.&amp;#160; These entries will be located in the System Event Log.&amp;#160; You can ignore errors that show “KDC_ERR_PREAUTH_REQUIRED”.&amp;#160; That is just noise and expected.&amp;#160; Also realize that errors may be cached and if they are, you will not see them in the Event Log or a Network Trace. It may require an IISRESET, a reset of the C2WTS Windows Service, or even a reboot of the box to get the items to show in the Event log or Network Trace. See this &lt;a href="http://blogs.msdn.com/b/psssql/archive/2009/07/01/when-in-doubt-reboot.aspx" target="_blank"&gt;Blog Post&lt;/a&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;Log Name:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System        &lt;br /&gt;Source:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Microsoft-Windows-Security-Kerberos         &lt;br /&gt;Date:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 5/17/2013 9:04:40 AM         &lt;br /&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 3         &lt;br /&gt;Task Category: None         &lt;br /&gt;Level:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Error         &lt;br /&gt;Keywords:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Classic         &lt;br /&gt;User:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; N/A         &lt;br /&gt;Computer:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CaptHelo.battlestar.local         &lt;br /&gt;Description:         &lt;br /&gt;A Kerberos error message was received:         &lt;br /&gt;on logon session         &lt;br /&gt;Client Time:         &lt;br /&gt;Server Time: 14:4:40.0000 5/17/2013 Z         &lt;br /&gt;Error Code: 0xd &lt;font style="background-color: #ffff00"&gt;KDC_ERR_BADOPTION&lt;/font&gt;         &lt;br /&gt;Extended Error: 0xc0000225 KLIN(0)         &lt;br /&gt;Client Realm:         &lt;br /&gt;Client Name:         &lt;br /&gt;Server Realm: BATTLESTAR.LOCAL         &lt;br /&gt;Server Name: &lt;font style="background-color: #00ff00"&gt;cifs/captthrace.battlestar.local&lt;/font&gt;         &lt;br /&gt;Target Name: cifs/captthrace.battlestar.local@BATTLESTAR.LOCAL         &lt;br /&gt;Error Text:         &lt;br /&gt;File: 9         &lt;br /&gt;Line: 12be         &lt;br /&gt;Error Data is in record data.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This entry was the only non-PREAUTH_REQUIRED error.&amp;#160; Two things that were interesting about this.&amp;#160; First was &lt;font style="background-color: #ffff00"&gt;KDC_ERR_BADOPTION&lt;/font&gt;.&amp;#160; When I see this, especially in a Claims type configuration, it tells me we have a Constrained Delegation issue.&amp;#160; The other item that was interesting was the &lt;font style="background-color: #00ff00"&gt;CIFS&lt;/font&gt; SPN.&amp;#160; CIFS is used for File Sharing.&amp;#160; It stands for “Common Internet File System”.&amp;#160; This was our SMB traffic.&amp;#160; We can also see this in the Network Trace.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;319&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; 10.0.0.1&amp;#160;&amp;#160;&amp;#160; KerberosV5&amp;#160;&amp;#160;&amp;#160; KerberosV5:TGS Request Realm: BATTLESTAR.LOCAL Sname: &lt;font style="background-color: #00ff00"&gt;cifs/captthrace.battlestar.local&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {TCP:44, IPv4:14}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;321&amp;#160;&amp;#160;&amp;#160; 9:04:40 AM 5/17/2013&amp;#160;&amp;#160;&amp;#160; 10.0.0.1&amp;#160;&amp;#160;&amp;#160; 10.0.0.20&amp;#160;&amp;#160;&amp;#160; KerberosV5&amp;#160;&amp;#160;&amp;#160; &lt;font color="#ff0000"&gt;KerberosV5:KRB_ERROR&amp;#160; - KDC_ERR_BADOPTION (13)&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; {TCP:44, IPv4:14}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This was interesting, because I never gave Constrained Delegation rights to CIFS for the C2WTS or the Computer Account.&amp;#160; When we talk about SPN’s and Delegation and placement, we talk about that the SPN should be on the account that is running the servers.&amp;#160; For CIFS, it will be the system itself and therefore on the machine account of the SQL Server that we are trying to connect to.&amp;#160; &lt;/p&gt;  &lt;p&gt;CIFS is one of those special Service Classes, similar to HTTP.&amp;#160; It is covered by the HOST SPN on the Machine Account and we won’t see an actual CIFS SPN defined, but when we go to the delegation side of things you will see it.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/8662.image4_5F00_4CDD7FEF.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5852.image4_5F00_thumb_5F00_7DFCBA8F.png" width="368" height="239" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3324.image7_5F00_0F6D1B68.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/1185.image7_5F00_thumb_5F00_6EE5DBB5.png" width="364" height="354" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I added this to both the Claims Service account and the Computer Account.&amp;#160; I say computer account, because the actual SMB request will come from the machine and not directly from the RS Process.&amp;#160; Under the hoods, it is affectively making a call to the CreateFile Windows API.&amp;#160; &lt;/p&gt;  &lt;p&gt;After resetting IIS and cycling the C2WTS Service, I still saw the same exact error.&amp;#160; This was one of those reboot moments.&amp;#160; After rebooting the server, I then got the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3326.image_5F00_3C15D541.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6076.image_5F00_thumb_5F00_29CD0E7F.png" width="234" height="63" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I didn’t necessarily expect this as I expected to fail on the Kerb side to SQL.&amp;#160; So, I ran a report and stuck a WAITFOR DELAY in there so I could see the connection.&amp;#160; had a look at dm_exec_connections on the SQL Server and saw that we had connected with NTLM:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5482.image_5F00_497BE847.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/7485.image_5F00_thumb_5F00_490FB552.png" width="428" height="244" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;For our purposes this will work as I’m not going further than SQL.&amp;#160; This is technically a single hop between the SharePoint Server System context and the SQL Server.&amp;#160; You can configure it for Kerberos if you really want that auth_scheme by creating the appropriate Named Pipes SPN and configuring the appropriate Delegation for the C2WTS Service Account and the Machine Account for where the SMB request is originating from.&amp;#160; Also realize that if you have a misplaced Named Pipes SQL SPN, you will encounter a “Cannot Generate SSPI Context” similar to the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4760.image_5F00_48374F68.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4375.image_5F00_thumb_5F00_67E62930.png" width="566" height="119" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#333333"&gt;Adam W. Saxton | Microsoft Escalation Services&lt;/font&gt;     &lt;br /&gt;&lt;a href="http://twitter.com/awsaxton"&gt;http://twitter.com/awsaxton&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10419751" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Connectivity/">Connectivity</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Reporting+Services/">Reporting Services</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint+Integration/">SharePoint Integration</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Adam/">Adam</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Kerberos/">Kerberos</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint+Adventures/">SharePoint Adventures</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+Server+2012/">SQL Server 2012</category></item><item><title>SharePoint Adventures : When connectivity is not connectivity</title><link>http://blogs.msdn.com/b/psssql/archive/2013/05/17/sharepoint-adventures-when-connectivity-is-not-connectivity.aspx</link><pubDate>Fri, 17 May 2013 13:07:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10419658</guid><dc:creator>Adam W. Saxton</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10419658</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/05/17/sharepoint-adventures-when-connectivity-is-not-connectivity.aspx#comments</comments><description>&lt;p&gt;I’m always amazed that issues usually come in batches.&amp;#160; I was looped into a few cases that had the following symptoms.&amp;#160;&amp;#160; They were running SharePoint 2010 and Reporting Services 2012 SP1.&amp;#160; When they went to use a data source with Windows Authentication, they were seeing the following error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6866.image_5F00_53EDE748.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/1106.image_5F00_thumb_5F00_5E3F0BA8.png" width="244" height="126" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;System.Data.SqlClient.&lt;font color="#ff0000"&gt;SqlException&lt;/font&gt;: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: &lt;font color="#ff0000"&gt;&lt;font style="background-color: #ffff00"&gt;Named Pipes Provider&lt;/font&gt;, error: 40 - Could not open a connection to SQL Server&lt;/font&gt;)&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This caused me to raise an eyebrow (visions of Spock as the new Star Trek movie is opening today &amp;lt;g&amp;gt;).&amp;#160; A lot of thoughts were floating in my head that all told me that this error didn’t make sense, for a bunch of reasons.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The default protocol order for connecting to SQL from a client is TCP and then Named Pipes.&amp;#160; So, because we failed with a &lt;font style="background-color: #ffff00"&gt;Named Pipes&lt;/font&gt; error, that meant something was either wrong with TCP or someone changed the Protocol order (which I have never seen in a customer case – so very unlikely) &lt;/li&gt;    &lt;li&gt;This is RS 2012, which means we are a Shared Service and rely on the Claims to Windows Token Service (C2WTS).&amp;#160; This forces Constrained Delegation.&amp;#160; Pretty sure most people would not have created the delegation requirements for the Named Pipes SQL SPN as most people go down the TCP route.&amp;#160; You can read more about SQL’s SPNs being Protocol based &lt;a href="http://blogs.msdn.com/b/psssql/archive/2010/03/09/what-spn-do-i-use-and-how-does-it-get-there.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; Also more on this related aspect in a later post as I found some interesting things about this as well. &lt;/li&gt;    &lt;li&gt;This error tells me that we couldn’t establish a connection to SQL via Named Pipes.&amp;#160; Think of this as a “Server Not Found” type error.&amp;#160; I immediately tossed out any Kerberos/Claims related issue due to that thinking – again more on the kerb piece of this in a later post. &lt;/li&gt;    &lt;li&gt;This is really the first time I’ve had someone hit me up with a Named Pipes connection failure from an RS/SharePoint Integration perspective ever.&amp;#160; And I just got hit with 3 of them within the same week.&amp;#160; Something is up. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Being this told me we had an actual connection issue via Named Pipes, I started down the normal connectivity troubleshooting path.&amp;#160; With any connectivity issue, I started with a UDL (Universal Data Link) file.&amp;#160; Basically just a text file renamed with an extension of UDL.&amp;#160; It’s important to run this from the same machine that is hitting the SqlException.&amp;#160; In my case it was my SharePoint App server, not the WFE server.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/1602.image_5F00_5DD2D8B3.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3660.image_5F00_thumb_5F00_5D66A5BE.png" width="341" height="357" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You’ll notice the “np:” in front of the server name.&amp;#160; This forces the Named Pipes Protocol and ignores the default protocol order.&amp;#160; And this worked.&amp;#160; I also tried “tcp:” to force TCP in the UDL and this worked to.&amp;#160; I went back to my data source and tried forcing TCP there.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3276.image_5F00_3CDF660C.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5861.image_5F00_thumb_5F00_3C733317.png" width="340" height="413" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;System.Data.SqlClient.&lt;font color="#ff0000"&gt;SqlException&lt;/font&gt;: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: &lt;font color="#ff0000"&gt;&lt;font style="background-color: #ffff00"&gt;TCP Provider&lt;/font&gt;, error: 0 - The requested name is valid, but no data of the requested type was found.)&lt;/font&gt;&lt;/font&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This made no sense.&amp;#160; I even made sure I was logged in as the RS Service Account as that is the context in which we would have been connecting to SQL.&amp;#160; Same result.&amp;#160; Also, within a network trace, I saw nothing on either the TCP or Named Pipes side of the house in the trace that related to this connection attempt.&amp;#160; Which meant we never hit the wire.&amp;#160; &lt;/p&gt;  &lt;p&gt;As I was going to collect some additional diagnostic logging (Kerberos ETW tracing and LSASS Logging) I ended up doing an IISRESET and a recycle of the C2WTS service.&amp;#160; We went to reproduce the issue, but got a different error this time.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6740.image_5F00_10C2691B.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/4721.image_5F00_thumb_5F00_307142E3.png" width="395" height="129" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;System.IO.&lt;font color="#ff0000"&gt;FileLoadException&lt;/font&gt;: &lt;font color="#ff0000"&gt;Could not load file or assembly 'System.EnterpriseServices&lt;/font&gt;, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)&amp;#160; File name: 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---&amp;gt; System.Runtime.InteropServices.COMException (0x80070542): Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This error I did know and can work with.&amp;#160; I had blogged about this error last July &lt;a href="http://blogs.msdn.com/b/psssql/archive/2012/07/11/could-not-load-file-or-assembly-system-enterpriseservices.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; Checking the “Act as part of the operating system” showed that the C2WTS service account in fact was not given that right.&amp;#160; Adding that account to that policy right and restarting the C2WTS Windows Service and performing an IISRESET then yielded the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6862.image_5F00_6FCEF673.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/2063.image_5F00_thumb_5F00_1AA75A86.png" width="279" height="75" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The connectivity errors were clearly related to the lack of the Policy Setting.&amp;#160; It was unexpected and didn’t line up with normal connectivity related issues and also wasn’t very helpful with regards of where to go look for more information as all of the normal paths didn’t show anything useful.&lt;/p&gt;  &lt;p&gt;Of note, I tried reproducing this on SharePoint 2013, but only got the FileLoadException.&amp;#160; I think this is partly a timing issue with how IIS AppPools are started and the C2WTS service is started.&amp;#160; Doesn’t mean you won’t see this on SharePoint 2013 necessarily.&amp;#160; Even on SharePoint 2010, the first time I hit the FileLoadException.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#333333"&gt;Adam W. Saxton | Microsoft Escalation Services      &lt;br /&gt;&lt;/font&gt;&lt;a href="http://twitter.com/awsaxton"&gt;http://twitter.com/awsaxton&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10419658" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Connectivity/">Connectivity</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Reporting+Services/">Reporting Services</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint+Integration/">SharePoint Integration</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Adam/">Adam</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint+Adventures/">SharePoint Adventures</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Claims/">Claims</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+Server+2012/">SQL Server 2012</category></item><item><title>SQL Server–Storage Spaces/VHDx and 4K Sector Size</title><link>http://blogs.msdn.com/b/psssql/archive/2013/05/15/sql-server-storage-spaces-vhdx-and-4k-sector-size.aspx</link><pubDate>Wed, 15 May 2013 14:40:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418924</guid><dc:creator>psssql</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10418924</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/05/15/sql-server-storage-spaces-vhdx-and-4k-sector-size.aspx#comments</comments><description>&lt;p&gt;This blog outlines a new twist to my previous blog outlining issues with 4K sector sizes.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Server - New Drives Use 4K Sector Size: &lt;/strong&gt;&lt;a href="http://blogs.msdn.com/b/psssql/archive/2011/01/13/sql-server-new-drives-use-4k-sector-size.aspx"&gt;http://blogs.msdn.com/b/psssql/archive/2011/01/13/sql-server-new-drives-use-4k-sector-size.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the previous post I discussed that it was &lt;font color="#c0504d"&gt;unsafe for the I/O subsystem to present a sector size that was smaller than the actual, physical sector size&lt;/font&gt;.&amp;#160;&amp;#160; This leads to unsupported, Read-Modify-Write (RMW) behavior.&lt;/p&gt;  &lt;p&gt;I was doing testing on a Windows 2012 Server - Storage Space setup and found that both Storage Spaces and the VHDx format can report a 4K sector size to the SQL Server.&amp;#160;&amp;#160; This allows the various drives setup in the pool for Storage Spaces to be of disparate sector sizes (Drive 1 = 512 bytes, 1K, 2K, and Drive 4 = 4K.)&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Is this safe for SQL Server?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The answer is yes&lt;/strong&gt;.&amp;#160; An I/O subsystem can return a larger sector size than actual, physical sector size as long as all reported values can be evenly divided by 512 bytes.&lt;/p&gt;  &lt;p&gt;As the diagram below shows, SQL Server maintains parity on 512 byte boundaries, for the log, regardless of the reported sector size.&amp;#160;&amp;#160; This allows SQL Server to detect a partial write (torn behavior.)&amp;#160;&amp;#160; For example, if the system reported a sector size of 4K but the physical sector size was 512 bytes, &lt;em&gt;the I/O subsystem is only guaranteed to flush to a 512 byte mark&lt;/em&gt;.&amp;#160;&amp;#160; If the first 4, physical sectors are flushed (2K of the 4K aligned block) and a power outage occurs, SQL Server will be able to detect the entire 4K was not properly flushed.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3644.image_5F00_4C8F684E.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/7382.image_5F00_thumb_5F00_39DA6E97.png" width="457" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Without the logical parity every 512 bytes SQL Server would be unable to detect the torn situation, leading to unexpected recovery and logging behavior(s).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#c0504d"&gt;WARNING:&lt;/font&gt;&lt;/strong&gt;&amp;#160; While SQL Server protects your data against such a failure the reporting of sector size, larger than physical sector size, can lead to unwanted/unexpected space usage.&amp;#160;&amp;#160; SQL Server will align the log writes to the reported sector size (4K in this example.)&amp;#160; &lt;/p&gt;  &lt;p&gt;SQL Server packs records within the log blocks and then aligns/pads the writes on the reported sector boundary.&amp;#160; Lots of small transactions, leading to many log flushes, can result in wasted log space for a system reporting larger sector sizes.&amp;#160;&amp;#160; Moving the scenario to an I/O subsystem reporting smaller sector sizes can reduce space usage.&lt;/p&gt;  &lt;p&gt;The easiest way to see this in action is a single worker doing tiny transactions.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;while(1=1)&lt;/p&gt;    &lt;p&gt;begin&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160; insert into tblTest values (1)&amp;#160;&amp;#160; // Each insert is a transaction and a log flush&lt;/p&gt;    &lt;p&gt;end&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Each insert is a separate commit transaction, causing the log to be flushed for each iteration.&amp;#160;&amp;#160; In this example each insert will require at least 4K of log space to properly align during the flush.&amp;#160;&amp;#160;&amp;#160; Wrapping a transaction around the while loop or only committing at reasonable boundaries (say 10,000 inserts) reduces the log flushing behavior and uses the log space more effectively.&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(166, 166, 166); font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 8pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-latin; mso-no-proof: yes;"&gt;Bob Dorr - Principal SQL Server Escalation Engineer&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418924" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Engine/">Engine</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/2005+SP2/">2005 SP2</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/2008/">2008</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/2005/">2005</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+2005/">SQL 2005</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+2008/">SQL 2008</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+2012/">SQL 2012</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+Server+2012/">SQL Server 2012</category></item><item><title>Using PowerShell to discover Reporting Services 2012 in SharePoint</title><link>http://blogs.msdn.com/b/psssql/archive/2013/04/30/using-powershell-to-discover-reporting-services-2012-in-sharepoint.aspx</link><pubDate>Tue, 30 Apr 2013 18:58:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10415178</guid><dc:creator>Adam W. Saxton</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10415178</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/04/30/using-powershell-to-discover-reporting-services-2012-in-sharepoint.aspx#comments</comments><description>&lt;p&gt;I was recently going through an exercise of documenting how to discover certain aspects of Reporting Services for some Kerberos work.&amp;#160; RS 2012 in SharePoint is a totally different game though.&amp;#160; The easiest way I could discover certain items about Reporting Services within SharePoint was with PowerShell.&amp;#160; For previous versions, and RS 2012 in Native Mode, we can use other avenues such as WMI to discover configuration of Reporting Services.&lt;/p&gt;  &lt;h2&gt;Service Enumeration&lt;/h2&gt;  &lt;p&gt;One of the big things we want to do when we are discovering what is out there is to be able to tell if we even have the service installed.&amp;#160; This may also lead to multiple services within SharePoint.&amp;#160; Within SQL 2012, Reporting Services is a Shared Service within SharePoint and is deployed as such. We could run the following to see the Service Applications that are configured.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;Get-SPServiceApplication |where {$_.TypeName -like &amp;quot;SQL Server Reporting*&amp;quot;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/7711.image_5F00_600E754E.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5483.image_5F00_thumb_5F00_3867F924.png" width="600" height="106" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This aligns with what we see in Central Admin as well.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5008.image_5F00_02EF36FF.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/3513.image_5F00_thumb_5F00_1774867D.png" width="469" height="302" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From the Kerberos/Claims configuration perspective, we are also interested in the Service Account for the Reporting Services Application. Also keeping in mind that there may be more than one.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;$apps = Get-SPServiceApplication |where {$_.TypeName -like &amp;quot;SQL Server Reporting*&amp;quot;}       &lt;br /&gt;foreach ($app in $apps){&amp;quot;{0,-20} {1,-20}&amp;quot; -f $app.name, $app.ApplicationPool.ProcessAccountName}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6558.image_5F00_56D23A0D.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6560.image_5F00_thumb_5F00_0F7CE41B.png" width="712" height="75" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We can see that the name is “Reporting Services” and the AppPool Process Account is “BATTLESTAR\rsservice”. The next piece of information we want to know is which SharePoint boxes is this service running on?&amp;#160; We could have any number of App Servers that we need to go check.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;$services = Get-SPServiceInstance |where {$_.TypeName –like &amp;quot;*Reporting*&amp;quot;}       &lt;br /&gt;foreach ($service in $services){&amp;quot;{0,-20} {1,-20}&amp;quot; -f $service.parent.address, $service.status}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/2043.image_5F00_410851B0.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/0602.image_5F00_thumb_5F00_60B72B78.png" width="709" height="75" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In this example, I only have one server that has the Reporting Services Service started within SharePoint and that is on the CAPTHELO server. We can then compare with the Claims to Windows Token Service (C2WTS).&lt;/p&gt;  &lt;h3&gt;Claims to Windows Token Service (C2WTS)&lt;/h3&gt;  &lt;p&gt;As part of SQL 2012 with SharePoint Integration, the Claims to Windows Token Service plays a big part in our functionality when it comes to Kerberos. As such, if we are going to validate RS 2012 in SharePoint configuration, we need to look at C2WTS as well. We can use the following PowerShell command to get the C2WTS instances:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;Get-SPServiceInstance |where {$_.TypeName -like &amp;quot;*Claims*&amp;quot;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;One thing to remember is that C2WTS is not a service app.&amp;#160; You may see multiple items here if they have more than one SharePoint Server.&amp;#160; For example, in my environment I have two SharePoint Servers:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5076.image_5F00_604AF883.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/1362.image_5F00_thumb_5F00_2DE72504.png" width="714" height="110" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The service only needs to be started on the SharePoint Box where the Reporting Services Shared Service is started as well. In the Reporting Services example above, we know that Reporting Services is only active on CAPTHELO, so that is where C2WTS needs to be started.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;$services = Get-SPServiceInstance |where {$_.TypeName –like &amp;quot;*Claims*&amp;quot;}       &lt;br /&gt;foreach ($service in $services){&amp;quot;{0,-20} {1,-20} {2}&amp;quot; -f $service.parent.address, $service.status, $service.Service.ProcessIdentity.username}&lt;/font&gt;      &lt;br /&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/5670.image_5F00_4676C254.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/0285.image_5F00_thumb_5F00_7B171E8F.png" width="729" height="104" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We can see that we have two SharePoint servers here.&amp;#160; C2WTS is started on LTBOOMER but it is not running on CAPTHELO.&amp;#160; This will result in an error such as the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/8231.image_5F00_2CA28C25.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-73-84-metablogapi/6175.image_5F00_thumb_5F00_4C5165ED.png" width="450" height="97" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ClaimsToWindowsTokenLoginTypeException: , Microsoft.ReportingServices.Diagnostics.Utilities.ClaimsToWindowsTokenLoginTypeException: &lt;font color="#ff0000"&gt;Can not convert claims identity to windows token&lt;/font&gt;. This may be due to user not logging in using windows credentials.;&lt;/font&gt;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From the last command above, we can also see the Process Identity for the C2WTS.&amp;#160; So, this will provide the service accounts for both Reporting Services and C2WTS as well as let us know which servers Reporting Services is enabled on and which servers C2WTS needs to be enabled on.&amp;#160; This could be very helpful when it comes to automation.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Adam W. Saxton | Microsoft Escalation Services    &lt;br /&gt;&lt;a href="http://twitter.com/awsaxton"&gt;http://twitter.com/awsaxton&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10415178" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Reporting+Services/">Reporting Services</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint+Integration/">SharePoint Integration</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/PowerShell/">PowerShell</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/Adam/">Adam</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SharePoint+Adventures/">SharePoint Adventures</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+Server+2012/">SQL Server 2012</category></item><item><title>AlwaysON - HADRON Learning Series: lock_redo_blocked/redo worker Blocked on Secondary Replica</title><link>http://blogs.msdn.com/b/psssql/archive/2013/04/26/alwayson-hadron-learning-series-lock-redo-blocked-redo-worker-blocked-on-secondary-replica.aspx</link><pubDate>Fri, 26 Apr 2013 18:34:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10414339</guid><dc:creator>psssql</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/psssql/rsscomments.aspx?WeblogPostID=10414339</wfw:commentRss><comments>http://blogs.msdn.com/b/psssql/archive/2013/04/26/alwayson-hadron-learning-series-lock-redo-blocked-redo-worker-blocked-on-secondary-replica.aspx#comments</comments><description>&lt;p&gt;The topic I received most in my inbox this week was &lt;em&gt;&lt;strong&gt;redo blocked on a secondary&lt;/strong&gt;&lt;/em&gt; while attempting to acquire SCH-M (schema modify) lock.&lt;/p&gt;  &lt;p&gt;First of all, this is expected behavior and you can monitor for this with your standard blocking activities (sys.dm_exec_requests, blocked process TRC event, blocked process threshold configuration setting(s) and the log_redo_blocked XEvent.)&lt;/p&gt;  &lt;p&gt;The SQL Server 2012 implementation of Always On extended the database mirroring (DBM) capabilities by allowing read only queries and backups against a secondary replica.&amp;#160;&amp;#160; With this new activity comes additional overhead.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1. When a replica is marked for read only capabilities the updated/inserted rows on primary add additional overhead for the row versioning to help support snapshot isolation activities of the read only connections.&lt;/p&gt;    &lt;p&gt;2. When queries are run against the secondary the SCH-S (schema stability) lock is held during the query to make sure the schema of the object can’t be changed during the processing of results.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In the case of the blocked, redo the read only clients typically have long running queries and the object is changed (ALTER, create index, …) on the primary.&amp;#160;&amp;#160; When the DDL activity arrives on the secondary the SCH-M is required to complete the requested, redo change.&amp;#160;&amp;#160;&amp;#160; This causes the redo worker to become blocked on the long running, read only query(s).&lt;/p&gt;  &lt;p&gt;You can monitor the redo queue size and other performance counters to determine the relative impact of redo being blocked and make any necessary business decisions to KILL the head blocker(s).&amp;#160; It will look no different than a production server with a head blocker that you resolve today.&lt;/p&gt;  &lt;p&gt;Microsoft is evaluating, for future builds, the ability to configure a replica to automatically kill a redo blocker, allowing redo to progress.&lt;/p&gt;  &lt;p&gt;&lt;font color="#cccccc" face="Calibri"&gt;Bob Dorr - Principal SQL Server Escalation Engineer&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10414339" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/psssql/archive/tags/AlwaysON/">AlwaysON</category><category domain="http://blogs.msdn.com/b/psssql/archive/tags/SQL+Server+2012/">SQL Server 2012</category></item></channel></rss>