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

<channel>
	<title>PowerPivotGeek &#187; Excel Services</title>
	<atom:link href="http://powerpivotgeek.com/category/excel-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://powerpivotgeek.com</link>
	<description>An adventure in managed self-service computing</description>
	<lastBuildDate>Wed, 14 Jul 2010 04:51:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Excel Services delegation</title>
		<link>http://powerpivotgeek.com/2009/12/11/excel-services-delegation/</link>
		<comments>http://powerpivotgeek.com/2009/12/11/excel-services-delegation/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 23:56:00 +0000</pubDate>
		<dc:creator>powerpivotgeek</dc:creator>
				<category><![CDATA[Excel Services]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://powerpivotgeek.com/?p=440</guid>
		<description><![CDATA[<p>I am inspired by a recent post from a colleague about the various issues that can come up with Excel Services delegation (see a Denny Lee’s blog here: http://dennyglee.com/2009/11/18/troubleshooting-powerpivot-excel-services-connectivity/) and I wanted to take it a bit further (and maybe a bit ‘geekie’-er)</p>
<p>First, why is this a problem? After all, as you can see in [...]]]></description>
			<content:encoded><![CDATA[<p>I am inspired by a recent post from a colleague about the various issues that can come up with Excel Services delegation (see a Denny Lee’s blog here: <a title="http://dennyglee.com/2009/11/18/troubleshooting-powerpivot-excel-services-connectivity/" href="http://dennyglee.com/2009/11/18/troubleshooting-powerpivot-excel-services-connectivity/">http://dennyglee.com/2009/11/18/troubleshooting-powerpivot-excel-services-connectivity/</a>) and I wanted to take it a bit further (and maybe a bit ‘geekie’-er)</p>
<p>First, why is this a problem? After all, as you can see in Denny’s post, you can see the workbook and you even have a thumbnail for it in the Gallery. What’s up here? The core of the problem is that unless you’ve set the connection to refresh when you first open the workbook, Excel Services uses its pivot cache to construct the pivot table and slicers. It is only if you manually refresh the connection, or click on a slicer, that you make an actual connection to the embedded data. Until then you are just looking at cached information. Until you click on a slicer, you don’t really know if Excel Services is working – so a <strong><span style="text-decoration: underline;">strong</span></strong> recommendation that I make to any person doing a validating their installation is to “ALWAYS CLICK ON A SLICER” if you want to make sure that your installation is working properly.</p>
<p>Ok, so now we’ve hit the problem. And you get the dredged “An error occurred during an attempt to establish a connection to the external data source.</p>
<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/12/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://powerpivotgeek.com/wp-content/uploads/2009/12/image_thumb2.png" border="0" alt="image" width="244" height="168" /></a> </p>
<p> </p>
<p><span id="more-440"></span></p>
<p>The issue is (get your geek-armor ready) is that when accessing data PowerPivot looks like just another data source to both Excel desktop and Excel Services. Prior to accessing the data, if using Windows authentication, Excel Services needs to impersonate the user on the calling thread. But, in a claims-aware world, the only ‘identity’ that Excel Services has is the claims token. When the user connects (in whatever authentication method the SharePoint Web Application allows), the first thing that SharePoint does on the web front end is to translate the authentication method’s user identity to a claims token. And it is <span style="text-decoration: underline;">that</span> claims token that is passed around within the farm. Remember this dialog box within Excel desktop:</p>
<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/12/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://powerpivotgeek.com/wp-content/uploads/2009/12/image_thumb3.png" border="0" alt="image" width="244" height="231" /></a></p>
<p>The setting tells Excel Services what kind of lookup to perform when a new connection is started:</p>
<ul>
<li>‘None’ means to use the Unattended Execution Account specified for the Excel Services service application being used by this connection. The username and password are retrieved from Secure Store. Using these credentials, Excel Services does a Windows logon and then it calls the data provider (the msolap OLEDB provider in the case of PowerPivot).</li>
<li>‘SSS’ means that Excel Services should access its Secure Store service application. The username and password are retrieved from Secure Store using this Application ID. Using these credentials, Excel Services does a Windows logon and then it calls the data provider Using and Excel Services does a Windows logon and then calls the data provider.</li>
<li>‘Windows Authentication’ (which is both the default and our case today) means that Excel Services should use the interactive user’s Windows identity. The original Windows token for the user is looked up, Excel Services impersonates that user on the calling thread and then calls the data provider.</li>
</ul>
<p>In the case of Windows Authentication, to perform the lookup, Excel Services uses the “Geneva to Windows Token Service” (GTS) provided by SharePoint. GTS takes the claims token of the caller and translates it to the Windows identity of the caller (the underlying Windows API that is uses for this is S4U (see here: xx). Unfortunately S4U does have its restrictions, and those restrictions are the heart of the “Cannot Delegate” error message that we are seeing. GTS requires:</p>
<ol>
<li>A domain controller must be available to validate the logon. GTS cannot use cached credentials. It has to validate the login token on every connection. This obviously has performance implications, but fortunately it isn’t on very query; but just when the connection is established. This is easy to see (and it was the way that I generated the error message box above) –&gt; just unplug the network from your laptop. You see that you can use SharePoint and Excel Services for everything using cached credentials until you go to Excel Services and try to connect to any data source (PowerPivot included) using Windows authentication.</li>
<li>The server must be a member of the same domain as the caller; or there must be a two-way trust relationship between the domains. This means that a common Windows 2000 domain architecture cannot be used by GTS.</li>
<li>The caller cannot be a local machine account. GTS only understands how to talk to domain controllers.</li>
<li>The account being used as the Excel Services service account must have AD rights to be able to query the object. One place where we know this restriction comes into play is if you have configured your domain controller to have a subgroup under “Users”, e.g. “Service Accounts”, which is a separate AD group that derives from “Users” –&gt; but I am sure that there are more. AD rights for service accounts is a common problem across all of SharePoint.</li>
</ol>
<p>So – this is happening to you – you cannot delegate credentials. What are your options? First, you could fix the problem so the restriction no longer holds, e.g. you could establish a two-way trust between the domains rather than a one-way trust, but this is likely not a doable approach because you probably have business justifications for why the configuration was done this way. A second alternative is that you could switch to “None” as the authentication, this is how the “off-the-network” blog entry that I wrote, see <a title="http://powerpivotgeek.com/2009/11/06/taking-your-server-off-the-network/" href="http://powerpivotgeek.com/2009/11/06/taking-your-server-off-the-network/">http://powerpivotgeek.com/2009/11/06/taking-your-server-off-the-network/</a>. This is straightforward and easy to implement, but it lacks the strong security enforcement of Windows authentication and it is a more general account. So there will likely be business issues with that approach also.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fpowerpivotgeek.com%2F2009%2F12%2F11%2Fexcel-services-delegation%2F&amp;linkname=Excel%20Services%20delegation"><img src="http://powerpivotgeek.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://powerpivotgeek.com/2009/12/11/excel-services-delegation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Peek Inside: Why no cross-farm support?</title>
		<link>http://powerpivotgeek.com/2009/11/25/a-peek-inside-why-no-cross-farm-support/</link>
		<comments>http://powerpivotgeek.com/2009/11/25/a-peek-inside-why-no-cross-farm-support/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 05:38:17 +0000</pubDate>
		<dc:creator>powerpivotgeek</dc:creator>
				<category><![CDATA[A Peek Inside]]></category>
		<category><![CDATA[Excel Services]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Cross-farm]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://powerpivotgeek.com/?p=410</guid>
		<description><![CDATA[<p> </p>
<p>From time to time, particular from knowledgeable SharePoint users coming up to speed with PowerPivot, I get the question: “PowerPivot have ‘cross-farm’ support”. As you can see from the title of this post, we don’t support it – and in this “A Peek Inside” I hope to explain why.</p>
<p>First, what is SharePoint ‘cross-farm’ support [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/11/image66.png"><img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://powerpivotgeek.com/wp-content/uploads/2009/11/image_thumb67.png" width="46" height="46" /></a> </p>
<p>From time to time, particular from knowledgeable SharePoint users coming up to speed with PowerPivot, I get the question: “PowerPivot have ‘cross-farm’ support”. As you can see from the title of this post, we don’t support it – and in this “A Peek Inside” I hope to explain why.</p>
<p>First, what is SharePoint ‘cross-farm’ support and why is it important. In large, complex SharePoint configurations a common requirement is to specialize servers or farms of servers to specific services. A good example of this approach is to have a separate farm dedicated to Search. Rather than having each end-user farm host its own Search service, the idea is to get better scale through specialization. Content crawling is done remotely; the indexes are kept remotely; and the Search results are calculated remotely. End users connect to the content farms (so-called because that is where the content is stored), but the content farm reaches out to specialized servers/farms for other services. Example of these services is: Search, Personalization, Business Data Catalog, Portal Usage reporting – coming in SharePoint 2010 are lots more . . .</p>
</p>
<p> <span id="more-410"></span>
<p>Here is an example:</p>
<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/11/image67.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://powerpivotgeek.com/wp-content/uploads/2009/11/image_thumb68.png" width="564" height="583" /></a> </p>
<p>So why can’t we put PowerPivot out on one of the specialized farms. At a cursory level this sounds like a good thing. You can could share PowerPivot servers across the whole enterprise rather than having to replicate them within each of the content farms (where the workbooks are stored). Sounds like a great idea. Unfortunately however, it isn’t technically possible. For those services such as PowerPivot and Excel Services that rely on on access to the content, there is no way for the remote service to reach back into the content farm to access data. That is OK as far as it goes, but let’s get geekie and dig a bit deeper.</p>
<p>If you take a look at the kinds of services which can be spun out to specialized servers. These have several interesting characteristics, i.e. they are self-contained, and independent of the content itself.</p>
<p><strong>BDC</strong> –&gt; Obviously getting access to transactional systems is totally unrelated to the content (.docx, pptx, xlsx, etc.) that is stored in the content farms. Typically you are using BDC servers to lookup line of business reference data, e.g. customer master lists, product catalogs, transactional data, etc. None Typically this means lookups based on keys, e.g. give me the reference data for customer #42, or give me the reference data for product “abc”, or give me the POS data for transaction #291129211. As there are no references to the content, the BDC service can easily be deployed in its own server farm where it acts as a front-end to underlying corporate databases.</p>
<p><strong>Personalization</strong> –&gt; While personalization is related to a certain kind of content, i.e. the SharePoint People and Groups that would be used across various farms, it is also very self-contained. The keys are passed into the service for data lookups, but the actual personalized information is fully&#160; contained within the service itself and it has no dependency on the content.</p>
<p><strong>Search</strong> –&gt; At a first glance, it seems like Search should not be a good candidate for server farms. After all, Search is all about the content. Isn’t it?? As it turns out, it is about the content, but not during the actual lookup process. The Search farm contains the crawlers that are indexing the various SharePoint content farms (and from that point of view, it is <u>all</u> about the content), but it also crawls other sources as well. As it turns out, what the Search really needs at runtime isn’t the content – it is the <u>indexes</u> about the content. As these are kept self-contained within the Search farm, it turns out that Search is a good candidate for a server farm because at run time, what is used isn’t the content itself (there is no need for Search to reach back into the content farms), but rather access to the indexes that matters.</p>
<p>So when we were deciding if PowerPivot would be a candidate for cross-farm specialization, we had to look at the need for access to content. And this brings us to the “geek’est” (is that a real word??) part of the post. How do you programmatically access content in SharePoint. There are two different aspects to the problem: getting access to content if data is <u>within</u> the farm; and getting access if data is <u>outside</u> the farm. If the data is outside the farm, then there are 3 ways:</p>
<ol>
<li>Using the web services APIs that SharePoint exposes (flexible but very inefficient at large data sizes) </li>
<li>Using a standard HTTP GET against the SharePoint URL for where the content is stored, e.g. (this is what Search crawlers use)     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://&lt;sp_server&gt;/site/subsite/doclib/file.xlsx">/site/subsite/doclib/file.xlsx&quot;&gt;/site/subsite/doclib/file.xlsx&quot;&gt;http://&lt;sp_server&gt;/site/subsite/doclib/file.xlsx</a> </li>
<li>Using WebDAV that allows you to access content from the SharePoint farm as if it was a large, single file share, e.g.      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="file://\\&lt;sp_server&gt;\site\subsite\doclib\file.xlsx">\site\subsite\doclib\file.xlsx&quot;&gt;\site\subsite\doclib\file.xlsx&quot;&gt;\\&lt;sp_server&gt;\site\subsite\doclib\file.xlsx</a> </li>
</ol>
<p>Unfortunately none of those techniques work if you are within the farm because firewall rules do not allow backend servers to loopback into the front-end servers. If the data is <u>within</u> the farm then there is only one way to access content: use the SharePoint object model (aka SP ‘binary OM’) , e.g. SPFile.OpenBinaryStream. This is the preferred way of getting data as it is very efficient and accesses the SharePoint content databases directly. It is an order of magnitude (or more) faster than using the outside the farm APIs, even if loopback was allowed.</p>
<p>Now here’s the problem. The binary OM only allows you to access content from <u>within</u> the farm. You cannot reach out an retrieve data from a different farm. In the case of a remote PowerPivot server farm, it cannot use the binary OM to access the content farm – except if using the ‘outside the farm’ APIs – which is very inefficient and would not perform anywhere near fast enough. Thus for those services that are “content focused”, such as Excel Services and PowerPivot, you have no option but to build their app servers as part of the content farm; cross-farm support is not possible or feasible until there are considerable changes made to the SharePoint binary OM.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fpowerpivotgeek.com%2F2009%2F11%2F25%2Fa-peek-inside-why-no-cross-farm-support%2F&amp;linkname=A%20Peek%20Inside%3A%20Why%20no%20cross-farm%20support%3F"><img src="http://powerpivotgeek.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://powerpivotgeek.com/2009/11/25/a-peek-inside-why-no-cross-farm-support/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>When is a refresh not a refresh?</title>
		<link>http://powerpivotgeek.com/2009/11/15/when-is-a-refresh-not-a-refresh/</link>
		<comments>http://powerpivotgeek.com/2009/11/15/when-is-a-refresh-not-a-refresh/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 05:21:00 +0000</pubDate>
		<dc:creator>powerpivotgeek</dc:creator>
				<category><![CDATA[Data refresh]]></category>
		<category><![CDATA[Excel Services]]></category>
		<category><![CDATA[data sources]]></category>

		<guid isPermaLink="false">http://powerpivotgeek.com/?p=190</guid>
		<description><![CDATA[<p>Ok. This post will be a bit complicated but stick with me. Hopefully, in the end, all will be clear. And the geek in you will love it.</p>
<p>One of the things that users just kind of glance over, but don’t realize the implication, is the fact that PowerPivot is a copy of the data. If [...]]]></description>
			<content:encoded><![CDATA[<p>Ok. This post will be a bit complicated but stick with me. Hopefully, in the end, all will be clear. And the geek in you will love it.</p>
<p>One of the things that users just kind of glance over, but don’t realize the implication, is the fact that PowerPivot is a copy of the data. If you haven’t already, let me suggest that you read my <a href="http://powerpivotgeek.com/2009/11/09/a-peek-inside-wheres-the-beef/">&quot;Where&#8217;s the beef?&quot; posting</a>. In that posting I talked about the fact that <u><strong>data itself</strong></u> is pulled into the workbook when you save it. When you click any of these buttons:</p>
<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/11/image63.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="484" alt="image" src="http://powerpivotgeek.com/wp-content/uploads/2009/11/image_thumb64.png" width="630" border="0" /></a> </p>
<p>The import process runs. From then on, the data can start change and shift away from the values that is stored in memory and ultimately in the workbook. The data is ‘real-time’ only when the import is running; afterwards all calculations, pivot and slice is driven by the stored data. On the client this is clear because we have the ‘Refresh’ button (and its options) that provide refresh on the client. But how about the server?? Well, that is the core of this posting. Let’s take a closer look at it. We will start at the menu items for the Excel Services rendering of the workbook. Notice the options here:</p>
</p>
<p> <span id="more-190"></span>
</p>
<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/11/image64.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="379" alt="image" src="http://powerpivotgeek.com/wp-content/uploads/2009/11/image_thumb65.png" width="644" border="0" /></a> </p>
<p>The question is “What does it mean to ‘refresh’ the connection?” The answer to that is that it depends on the data provider. For virtually every OLEDB and ODBC provider that Excel Services uses, ‘refreshing a connection’ means going out to the data source and re-querying the data source for its data. SQL Server RDBMS, Oracle, Teradata, virtually to everyone it means refreshing that Excel Services data. And it means that in PowerPivot also, but in PowerPivot where is the data stored? (You know the answer this already, don’t you). The data is in the workbook. Has the workbook changed since you last opened the .xlsx file? Well, I suppose it might have – and in which case, refreshing the connection might bring in new data. But in the vast, vast number of cases, <em>refreshing the PowerPivot table means just re-reading the data that Excel Services already has</em>. In most cases, it has absolutely no effect at all.</p>
<p>To really drive this home, let’s shift into super-geek mode and drill down into the workbook itself. I will go back to the workbook in the first screen shot and first click on the Connections option in the Data ribbon. Notice that there is a connection that has been defined behind my back in the workbook. It is called “Sandbox” which by the way was the name of our system prior to Gemini and prior to PowerPivot. I didn’t create that connection. It was created for me when the PowerPivot Excel add in was first started. This is the connection which is actually interfacing to the in-memory database. Now let’s drilldown further into the “Sandbox” connection and look at its connection string. WOW! The “Data Source=” property, which would normally point to the server for where the database is stored, instead points to “<strong>$Embedded$</strong>” – What’s that?? </p>
<p><a href="http://powerpivotgeek.com/wp-content/uploads/2009/11/image65.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="484" alt="image" src="http://powerpivotgeek.com/wp-content/uploads/2009/11/image_thumb66.png" width="644" border="0" /></a> </p>
<p><strong>$Embedded$</strong> is the magic tag that tells PowerPivot for SharePoint that the data does not come from some server somewhere – instead the data comes from the workbook itself. One of the new OLEDB interfaces created for PowerPivot is a property that Excel Services sets which contains the URL for the workbook that Excel Services is opening. The msolap OLEDB provider takes that URL and replaces the $Embedded$ string with the URL itself –&gt; and thus the infrastructure will read its data from the workbook itself.</p>
<p>But – and this is the critical “BUT” – notice that the embedded content never changes. After you upload a workbook, that workbook doesn’t change on its own. Thus neither does the data. Remember the data is a <strong><u>copy</u></strong> of the data that is embedded in a workbook. If Excel Services refreshes it, the ECS calc engine gets the same data over and over again. The SSAS database embedded in the workbook hasn’t changed – so the data refresh is a nop – it never changes. Refreshing a connection to an embedded PowerPivot database doesn’t refresh anything. You get the same data over and over again.</p>
<p>So, how does the workbook data get refreshed? After all, there must be some way to do it . . . In fact, there are two ways:</p>
<ol>
<li>Bring the workbook down on the client and refresh the data in the workbook. Then re-publish the workbook back to the same location in SharePoint. New data is automatically given to Excel Services and existing connections. </li>
<li>Use the data refresh facility, see the <a href="http://powerpivotgeek.com/misc/my-other-blog-articles/powerpivot-data-refresh/">data refresh posting</a> and <a href="http://powerpivotgeek.com/2009/11/12/steps-taken-during-a-powerpivot-data-refresh/">detailed steps posting</a> for more information. In this case the PowerPivot System Service will reach out and pull in new data into the workbook. A new version of the workbook is created and new data is automatically give to Excel Service and existing connections. </li>
</ol>
<p>And before you ask, <u>No</u>, PowerPivot V1 has no option to monitor the data in real-time and update its data in-memory as the source data changes. The workbook captures the data at a point in time – and then users work with that data. There are no provisions for real-time access to data while doing analytics / calculations / pivot table operations. </p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fpowerpivotgeek.com%2F2009%2F11%2F15%2Fwhen-is-a-refresh-not-a-refresh%2F&amp;linkname=When%20is%20a%20refresh%20not%20a%20refresh%3F"><img src="http://powerpivotgeek.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://powerpivotgeek.com/2009/11/15/when-is-a-refresh-not-a-refresh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
