<?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>John Gallardo's Weblog</title><link>http://blogs.msdn.com/b/jgalla/</link><description>From Windows Phone</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.14036 (Build: 5.6.583.14036)</generator><item><title>DataContext.Log and Windows Phone</title><link>http://blogs.msdn.com/b/jgalla/archive/2011/05/27/datacontext-log-and-windows-phone.aspx</link><pubDate>Fri, 27 May 2011 23:31:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10169232</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=10169232</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2011/05/27/datacontext-log-and-windows-phone.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Among the many features that are compatible between Linq To SQL on desktop Windows and on Windows Phone is the support for capturing all of the generated SQL as it is being sent to the database. This can be a great way to both gain an understanding of how L2S works, as well as optimize query complexity. One of the challenges with using this feature is actually collecting the data. Extracting the log out of isostore can be problematic. Typically I like to visualize the output of my queries in the Debug Output Window. However the problem there is that there is no TextWriter in the platform that can write there.&amp;#160; &lt;/p&gt;  &lt;p&gt;The solution is to simply wrap Debug.WriteLine() in your own TextWriter implementation. &lt;/p&gt;  &lt;p&gt;I am sure this has been done many times before, but here is my implementation:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;namespace &lt;/span&gt;PhoneHelper
{
    &lt;span style="color: blue"&gt;using &lt;/span&gt;System;
    &lt;span style="color: blue"&gt;using &lt;/span&gt;System.Diagnostics;
    &lt;span style="color: blue"&gt;using &lt;/span&gt;System.IO;
    &lt;span style="color: blue"&gt;using &lt;/span&gt;System.Text;

    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DebugStreamWriter &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;TextWriter
    &lt;/span&gt;{
        &lt;span style="color: blue"&gt;private const int &lt;/span&gt;DefaultBufferSize = 256;
        &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringBuilder &lt;/span&gt;_buffer;

        &lt;span style="color: blue"&gt;public &lt;/span&gt;DebugStreamWriter()
        {
            BufferSize = 256;
            _buffer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringBuilder&lt;/span&gt;(BufferSize);
        }

        &lt;span style="color: blue"&gt;public int &lt;/span&gt;BufferSize
        {
            &lt;span style="color: blue"&gt;get&lt;/span&gt;;
            &lt;span style="color: blue"&gt;private set&lt;/span&gt;;
        }

        &lt;span style="color: blue"&gt;public override &lt;/span&gt;System.Text.&lt;span style="color: #2b91af"&gt;Encoding &lt;/span&gt;Encoding
        {
            &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;.UTF8; }
        }

        &lt;span style="color: blue"&gt;#region &lt;/span&gt;StreamWriter Overrides
        &lt;span style="color: blue"&gt;public override void &lt;/span&gt;Write(&lt;span style="color: blue"&gt;char &lt;/span&gt;value)
        {
            _buffer.Append(value);
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(_buffer.Length &amp;gt;= BufferSize)
                Flush();
        }

        &lt;span style="color: blue"&gt;public override void &lt;/span&gt;WriteLine(&lt;span style="color: blue"&gt;string &lt;/span&gt;value)
        {
            Flush();

            &lt;span style="color: blue"&gt;using&lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;reader = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringReader&lt;/span&gt;(value))
            {
                &lt;span style="color: blue"&gt;string &lt;/span&gt;line; 
                &lt;span style="color: blue"&gt;while&lt;/span&gt;( &lt;span style="color: blue"&gt;null &lt;/span&gt;!= (line = reader.ReadLine()))
                    &lt;span style="color: #2b91af"&gt;Debug&lt;/span&gt;.WriteLine(line);
            }
        }

        &lt;span style="color: blue"&gt;protected override void &lt;/span&gt;Dispose(&lt;span style="color: blue"&gt;bool &lt;/span&gt;disposing)
        {
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(disposing)
                Flush();
        }

        &lt;span style="color: blue"&gt;public override void &lt;/span&gt;Flush()
        {
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(_buffer.Length &amp;gt; 0)
            {
                &lt;span style="color: #2b91af"&gt;Debug&lt;/span&gt;.WriteLine(_buffer);
                _buffer.Clear();
            }
        }
        &lt;span style="color: blue"&gt;#endregion
    &lt;/span&gt;}
}&lt;/pre&gt;

&lt;p&gt;And the output:&lt;/p&gt;


&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-22-metablogapi/5861.image_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-22-metablogapi/3113.image_5F00_thumb.png" width="833" height="115" /&gt;&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=10169232" width="1" height="1"&gt;</description></item><item><title>Now From Windows Phone</title><link>http://blogs.msdn.com/b/jgalla/archive/2011/05/24/now-from-windows-phone.aspx</link><pubDate>Tue, 24 May 2011 21:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10167983</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=10167983</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2011/05/24/now-from-windows-phone.aspx#comments</comments><description>&lt;p&gt;Last November I decided to leave the SQL Reporting Services team and join the Windows Phone Application Platform team. This is the team responsible for delivering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The overall application model for windows phone (how are they installed, secured and activated)&lt;/li&gt;
&lt;li&gt;Runtime integration (hosting of Silverlight Mobile and XNA applications within NetCF)&lt;/li&gt;
&lt;li&gt;Phone specific frameworks (ex: Sensors)&lt;/li&gt;
&lt;li&gt;Data and Cloud programmability (Push Notifications, Structured Storage)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have been working mostly on data programmability since joining the team, bringing Linq To SQL down to the phone from the desktop. &lt;/p&gt;
&lt;p&gt;You can play with the new features in the recently released &lt;a href="http://create.msdn.com/en-US/news/WPDT_7.1_Beta"&gt;Developer Tools for Windows Phone Mango Beta&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, &lt;a href="http://jesseliberty.com/"&gt;Jesse Liberty&lt;/a&gt; has done a good job of capturing some of the &lt;a href="http://jesseliberty.com/2011/05/14/best-practices-for-local-databases/"&gt;best practices for Linq To SQL on Windows Phone&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=10167983" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/LinqToSql/">LinqToSql</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/Windows+Phone/">Windows Phone</category></item><item><title>RS PowerShell Gems – The WMI Provider</title><link>http://blogs.msdn.com/b/jgalla/archive/2010/05/26/rs-powershell-gems-the-wmi-provider.aspx</link><pubDate>Thu, 27 May 2010 00:20:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10016003</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=10016003</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2010/05/26/rs-powershell-gems-the-wmi-provider.aspx#comments</comments><description>&lt;p&gt;For IT administration of a Report Server instance, you will occasionally need to use WMI.&amp;#160; We try to ease this to some extent by exposing a command line tool rsconfig.exe as well as the RS Configuration Tool UI. That said, sometimes you just need to talk to WMI directly – and for that PowerShell is a great tool!&lt;/p&gt;  &lt;p&gt;Here are a couple of script fragments that I have used in the past:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;# Gem 1 - Enumerate All Instances     &lt;br /&gt;# &lt;/p&gt;    &lt;p&gt;$computer = &amp;quot;JGALLA7&amp;quot;     &lt;br /&gt;$namespaces = gwmi -class &amp;quot;__NAMESPACE&amp;quot; -namespace &amp;quot;root\Microsoft\SqlServer\ReportServer&amp;quot; -computer $computer      &lt;br /&gt;[string]$fn = $namespaces[0].Name &lt;/p&gt;    &lt;p&gt;# any of the namespaces can be used to enumerate all instances     &lt;br /&gt;$instances = gwmi -class MSReportServer_Instance -namespace &amp;quot;root\Microsoft\SqlServer\ReportServer\$fn\v10&amp;quot; -computer $computer      &lt;br /&gt;$instances | ft InstanceName,EditionName,Version &lt;/p&gt;    &lt;p&gt;#InstanceName&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; EditionName&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Version     &lt;br /&gt;#------------&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -----------&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -------      &lt;br /&gt;#MSSQLSERVER&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ENTERPRISE EVALUATION EDITION&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ####      &lt;br /&gt;#ELEND&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ENTERPRISE EVALUATION EDITION&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ####      &lt;br /&gt;#VIN&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ENTERPRISE EVALUATION EDITION&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ####      &lt;br /&gt;#SAZED&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DEVELOPER EDITION&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #### &lt;/p&gt;    &lt;p&gt;# Gem 2 - get service account of each instance &lt;/p&gt;    &lt;p&gt;$configurations = gwmi -class MSReportServer_ConfigurationSetting -namespace &amp;quot;root\Microsoft\SqlServer\ReportServer\$fn\v10\Admin&amp;quot; -computer $computer     &lt;br /&gt;$configurations | ft InstanceName,ServiceName,WindowsServiceIdentityConfigured &lt;/p&gt;    &lt;p&gt;#InstanceName&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ServiceName&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; WindowsServiceIdentityConfigured     &lt;br /&gt;#------------&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -----------&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; --------------------------------      &lt;br /&gt;#MSSQLSERVER&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReportServer&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; redmond\####      &lt;br /&gt;#ELEND&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReportServer$ELEND&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NT Authority\NetworkService      &lt;br /&gt;#VIN&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReportServer$VIN&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NT Authority\NetworkService      &lt;br /&gt;#SAZED&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReportServer$SAZED&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NT AUTHORITY\NETWORK SERVICE &lt;/p&gt;    &lt;p&gt;# Gem 3 - Update Service Account Password of each instance using a particular user name     &lt;br /&gt;$username = &amp;quot;redmond\####&amp;quot;      &lt;br /&gt;$newpassword = &amp;quot;mynewpassword&amp;quot;      &lt;br /&gt;foreach ($update in $configurations | where {$_.WindowsServiceIdentityConfigured -eq $username})      &lt;br /&gt;{      &lt;br /&gt;&amp;#160; $update.SetWindowsServiceIdentity(0, $username, $newpassword)      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Some additional useful links:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms154648(v=SQL.105).aspx"&gt;MSReportServer_ConfigurationSetting WMI class documentation&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms152858.aspx"&gt;MSReportServer_Instance WMI class documentation&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd315295.aspx"&gt;PowerShell Get-WMIObject cmdlet reference&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10016003" width="1" height="1"&gt;</description></item><item><title>RunningJobContext.IsClientConnected</title><link>http://blogs.msdn.com/b/jgalla/archive/2009/06/01/runningjobcontext-isclientconnected.aspx</link><pubDate>Mon, 01 Jun 2009 20:35:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9678798</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=9678798</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2009/06/01/runningjobcontext-isclientconnected.aspx#comments</comments><description>&lt;p&gt;I’ve seen a few people get confused over what this error message in the Reporting Services log file indicates. This message is generated when the Reporting Services web server detects that an HTTP request has experienced a remote disconnect.&amp;#160; In practice, this means that we queried the property HttpResponse.IsClientConnected and it returned false.&lt;/p&gt;  &lt;p&gt;So how does this work exactly, and are all requests subject to this kind of check? As Reporting Services is currently architected, not all operations are subject to this check. For potentially long-running operations (such as report renderings and interactivity operations – internally we refer to these as Cancelable operations) requests are registered with a central request manager, which has a thread which wakes up periodically to check whether or not the clients are still connected.&amp;#160; If they are not, then we begin the process of aborting that request on the server side in order to reclaim any resources that it is consuming.&lt;/p&gt;  &lt;p&gt;Basically every operation on the ReportExecution2005.asmx endpoint, as well as the UpdateReportExecutionSnapshot(), CreateReportHistorySnapshot(), GetReportParameters(), and GetUserModel() methods on the ReportService2005.asmx endpoint register themselves as potentially long running operations.&lt;/p&gt;  &lt;p&gt;So what should you do if you are seeing a lot of these errors in the log? Generally this is an indicator that requests are being torn down for some reason. This could be due to certain set of users being particularly impatient waiting for report results to return and closing their browser. Alternatively, we have seen some cases in the wild where certain proxies would internally time out requests after waiting for some period of time, at which time they close the connection to the Report Server. If you have such a deployment topology (proxy/load balancer between clients the Report Server) definately consider checking if such a configuration knob exists for your environment.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9678798" width="1" height="1"&gt;</description></item><item><title>Hiding parameter area when viewing reports</title><link>http://blogs.msdn.com/b/jgalla/archive/2009/03/23/hiding-parameter-area-when-viewing-reports.aspx</link><pubDate>Tue, 24 Mar 2009 00:19:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9502604</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=9502604</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2009/03/23/hiding-parameter-area-when-viewing-reports.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/jgalla/WindowsLiveWriter/Hidingparameterareawhenviewingreports_C939/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="344" alt="image" src="http://blogs.msdn.com/blogfiles/jgalla/WindowsLiveWriter/Hidingparameterareawhenviewingreports_C939/image_thumb.png" width="581" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When rendering reports, oftentimes the application would like to minimize as much of the non-report area of the viewer control as possible.&amp;#160; This is easily accomplished when rendering the report through the built-in report viewer control hosted in the ReportServer web site (http://servername/reportserver).&amp;#160; &lt;/p&gt;  &lt;p&gt;There are two parameters which control the rendering of the viewer control area:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;rc:Parameters&lt;/li&gt;    &lt;li&gt;rc:Toolbar&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;rc:Parameters can have 3 values:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;On&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Displays the parameter area as in the screenshot above.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Off&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Completely hides the parameter area.&amp;#160; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Collapsed&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Renders the parameter area initially minimized, so a user can expand it if they need to view/change the parameters for a report.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Here is an example URL which demonstrates rendering a report with rc:Parameters=Collapsed:&lt;/p&gt;  &lt;p&gt;https://servername/ReportServer?%2fSamples%2fSQL+2008+Samples%2fAdventureWorks2008+Sample+Reports%2fEmployee+Sales+Summary+2008&amp;amp;rs:Command=Render&amp;amp;rc:Parameters=Collapsed&lt;/p&gt;  &lt;p&gt;The other way of hiding the parameter area is to render the report with rc:Toolbar=false.&amp;#160; For many applications though, there are side-effects of this approach which I don’t think are desireable.&amp;#160; These are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;It disables the automatic ping-mechanism to keep the user’s report session alive.&amp;#160; This can lead to rsExecutionNotFound errors if the user leaves the page inactive for several minutes.&lt;/li&gt;    &lt;li&gt;It also removes the navigation (next page, find, etc…) UI.&lt;/li&gt;    &lt;li&gt;By default, it will cause every page of the report to be returned to the client.&amp;#160; For long reports, this is typically not desireable.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So if you are in a situation where you want to minimize the amount of extraneous UI initially presented to the user, while still allowing flexibility in having the end user change the parameter values, consider using rc:Collapsed=true when rendering the report.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9502604" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/Microsoft/">Microsoft</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>Hiding Rendering Extensions</title><link>http://blogs.msdn.com/b/jgalla/archive/2009/02/05/hiding-rendering-extensions.aspx</link><pubDate>Thu, 05 Feb 2009 21:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9399392</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=9399392</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2009/02/05/hiding-rendering-extensions.aspx#comments</comments><description>&lt;p&gt;This is documented behavior, but we see lots of questions on it.&amp;#160; A good mechanism for preventing users from accidently exporting reports to a format that you don’t want (for example, you might know that the report doesn’t render quite right in a particular format) is to mark the extension as “invisible” in the Report Server config file.&amp;#160; &lt;/p&gt;  &lt;p&gt;This MSDN documentation explains how to configure a rendering extension:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/ms154516.aspx" href="http://msdn.microsoft.com/en-us/library/ms154516.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms154516.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The important one here is the Visible attribute:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Visible&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;A value of &lt;strong&gt;false&lt;/strong&gt; indicates that the rendering extension should not be visible in user interfaces. If the attribute is not included, the default value is &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;By setting this attribute to false for a given extension, it will hide the extension from being visible in the Report Viewer control as well as in the delivery configuration pages.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9399392" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>RS Blogger shout-outs</title><link>http://blogs.msdn.com/b/jgalla/archive/2009/01/09/rs-blogger-shout-outs.aspx</link><pubDate>Fri, 09 Jan 2009 21:00:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9302304</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=9302304</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2009/01/09/rs-blogger-shout-outs.aspx#comments</comments><description>&lt;p&gt;If you are interested in Reporting Services, you probably already know about these blogs … because frankly they have more interesting things to say than me!&amp;#160; At any rate, just in case they happened to slip through the cracks for &lt;em&gt;you&lt;/em&gt;, I thought I would point you towards their blogs:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/robertbruckner/"&gt;Robert Bruckner&lt;/a&gt; – Robert is a developer that works on the Report Processing engine and basically knows just about everything there is to know about RS.&amp;#160; If you have been to any of the trade shows or other various RS conferences, you probably have met him.&amp;#160; If you have spend time on RS forums or newsgroups, you probably read some insightful response he had to a question.&amp;#160; He has a great ‘advanced’ RS blog that covers a broad range of topics.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/brianhartman/"&gt;Brian Hartman&lt;/a&gt; – Brian developed the Report Viewer control and has been hanging out on the MSDN forums answering your questions for years.&amp;#160; So if you are integrated Reporting Services with your application, you probably have used his stuff.&amp;#160; He’s finally succumbed to the pressure of starting his own blog to answer a lot of the common questions and themes he sees related to the Report Viewer.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9302304" width="1" height="1"&gt;</description></item><item><title>Avoid using HttpContext in your reports</title><link>http://blogs.msdn.com/b/jgalla/archive/2009/01/09/avoid-using-httpcontext-in-your-reports.aspx</link><pubDate>Fri, 09 Jan 2009 20:43:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9302268</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=9302268</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2009/01/09/avoid-using-httpcontext-in-your-reports.aspx#comments</comments><description>&lt;p&gt;On one of our internal mailing lists, someone was asking trying to retrieve some HTTP Headers that their internal application was submitting to the Report Server within the report.&amp;#160; Someone else responded with a code snippet containing the custom code that you can put into an RDL expression to do just that.&amp;#160; &lt;/p&gt;  &lt;p&gt;This is a bad idea.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.httpcontext.aspx"&gt;HttpContext&lt;/a&gt; has the interesting property of exposing per-request state via a static property.&amp;#160; Inherently, there is nothing really wrong this approach.&amp;#160; It allows access to data without having to plumb the data all of the way through every single API or object on the call stack.&amp;#160; However, one gotcha here is that HttpContext is only available on the thread that received the request, and not on any asynchronous threads that may be spawned by that request.&amp;#160; This can lead to subtle problems in your reports under the following conditions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When printing the report, the Report Server actually uses an asynchronous mechanism to render the report in order to return the first page quickly while continuing to render the additional pages in the background. &lt;/li&gt;    &lt;li&gt;In the case of a subscription delivery, there is actually no HTTP Request that initiated the request. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Additionally, in the future we will more than likely be making additional portions of report execution asynchronous to improve both perceived latency as well as taking advantage of multi-core processors during non-peak load.&lt;/p&gt;  &lt;p&gt;That said, there are a couple of scenarios I can think of where you might be &lt;em&gt;tempted &lt;/em&gt;to examine the HTTP Request during report execution.&amp;#160; These are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;You want to determine the path or location of the report, and you are doing so by examining the incoming request URL. &lt;/li&gt;    &lt;li&gt;Your application is passing some value to the report via an HTTP header. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;For each of these, there are built-in supported mechanisms.&amp;#160; For (1), there is a set of values &lt;a href="http://msdn.microsoft.com/en-us/library/ms157274(SQL.90).aspx"&gt;exposed by the global collections&lt;/a&gt; which allow to get information about the report server and the context report.&amp;#160; For example, there are Globals.ReportFolder, Globals.ReportName, and Globals.ReportServerUrl.&amp;#160; You can leverage these variables in report expressions rather than trying to tease apart the HTTP Request.&amp;#160; &lt;/p&gt;  &lt;p&gt;In the case of passing data to the report via an HTTP Header, there is already a built-in mechanism for passing data to a report execution.&amp;#160; They are called &lt;a href="http://msdn.microsoft.com/en-us/library/ms155917.aspx"&gt;report parameters&lt;/a&gt;.&amp;#160; They are useful for more than just providing query parameters!&amp;#160; You can use them to also pass application-specific information that some of your custom code may require.&lt;/p&gt;  &lt;p&gt;So what is the moral of the story?&amp;#160; Be very careful when accessing static objects that are request-specific in the context of your report via custom code.&amp;#160; Doing so exposes you to potential back-compat issues as we continue to bring the platform forward.&amp;#160; Wherever possible we try to expose enough context through the supported report processing and rendering object models, and if there are additions you need we would love to hear about them.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9302268" width="1" height="1"&gt;</description></item><item><title>Scaling out the Viewer Control and rsExecutionNotFound</title><link>http://blogs.msdn.com/b/jgalla/archive/2008/08/08/scaling-out-the-viewer-control-and-rsexecutionnotfound.aspx</link><pubDate>Fri, 08 Aug 2008 19:26:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8843777</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=8843777</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2008/08/08/scaling-out-the-viewer-control-and-rsexecutionnotfound.aspx#comments</comments><description>&lt;p&gt;One of the criteria that the report server uses to match the provided SessionID with a stored report is that the SessionID has to be provided by the same user that initially created the session.&amp;nbsp; Usually, this is the case.&amp;nbsp; Someone browses the report in IE, they click around to paginate or expand toggles, and things just work because they are the same user they were when they initially ran the report.&lt;/p&gt; &lt;p&gt;Sometimes though, things go wrong.&lt;/p&gt; &lt;p&gt;One way that this can happen is when you are hosting the ASP.Net Viewer Control in your own application and you are not impersonating the incoming user all the way to the backend report server.&amp;nbsp; This is a totally supported configuration, however there is a little caveat that you have to keep in mind.&amp;nbsp; Since the report server requires that the user names match across session retrievals, you have to ensure that the viewer control is impersonating the same user.&amp;nbsp; Sounds easy, right?&amp;nbsp; Well not so fast if you are using a machine specific account for your application pool which is hosting the viewer control.&amp;nbsp; The specific topology that can get you into trouble is something like the following:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/jgalla/WindowsLiveWriter/ScalingouttheViewerControlandrsExecution_8052/image%7B0%7D%5B12%5D.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="232" src="http://blogs.msdn.com/blogfiles/jgalla/WindowsLiveWriter/ScalingouttheViewerControlandrsExecution_8052/image%7B0%7D_thumb%5B10%5D.png" width="405" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In this scenario you have the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Client machines accessing multiple web frontends hosting the report viewer control via a load balancer.&lt;/li&gt; &lt;li&gt;The web frontend machines are using a machine-specific account to communicate with the report server (for example they are using the builtin NETWORK SERVICE account).&lt;/li&gt; &lt;li&gt;You are &lt;strong&gt;not &lt;/strong&gt;impersonating the incoming user in the viewer control when accessing the backend report server.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The sequence of operations that can lead to trouble are:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;The initial request from ClientA is routed to MachineA.&amp;nbsp; &lt;/li&gt; &lt;li&gt;The viewer control in MachineA instantiates a session with the report server.&amp;nbsp; Since the $MachineA credentials are sent, the session is associated with this user.&amp;nbsp; Keep in mind at this point the report server actually has no idea that there is some other logical user beyond the web frontend that is actually making the request.&lt;/li&gt; &lt;li&gt;The user views the first page of the report, and navigates to the second page.&lt;/li&gt; &lt;li&gt;The request for the second page is actually routed to MachineB by the load balancer.&lt;/li&gt; &lt;li&gt;The viewer control in MachineB attempts to load the user session, however this fails since the request to the report server is actually from $MachineB user and not the original $MachineA user.&amp;nbsp; The report server generates an rsExecutionNotFound error and returns that, resulting in an error being displayed to the user.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;There are a couple of ways to address this problem:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Architect your application such that you can flow credentials from the client all the way to the report server.&amp;nbsp; -- Or --&lt;/li&gt; &lt;li&gt;Ensure that your web frontend nodes can impersonate the same user when accessing the report server regardless of which machine the request is routed to (so use something like domain credentials to access the report server).&lt;/li&gt;&lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8843777" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/rsExecutionNotFound/">rsExecutionNotFound</category></item><item><title>Scaling Up: SSRS 2008 vs. SSRS 2005 (spoiler: 2008 wins)</title><link>http://blogs.msdn.com/b/jgalla/archive/2008/07/10/scaling-up-ssrs-2008-vs-ssrs-2005-spoiler-2008-wins.aspx</link><pubDate>Thu, 10 Jul 2008 18:59:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8717463</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=8717463</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2008/07/10/scaling-up-ssrs-2008-vs-ssrs-2005-spoiler-2008-wins.aspx#comments</comments><description>&lt;p&gt;The &lt;a href="http://sqlcat.com/"&gt;SQL Customer Advisory Team&lt;/a&gt;&amp;nbsp;just released a Technical Note comparing SQL Server Reporting Services 2008 vs. 2005 from a scale-up perspective.&amp;nbsp; Its good to see that a lot of the work that we did over this release focusing on performance and scalability (across the board, from the core server/processing infrastructure to specific rendering extensions) has really paid off.&amp;nbsp; You can read the entire article here:&lt;/p&gt; &lt;p&gt;&lt;a title="http://sqlcat.com/technicalnotes/archive/2008/07/09/scaling-up-reporting-services-2008-vs-reporting-services-2005-lessons-learned.aspx" href="http://sqlcat.com/technicalnotes/archive/2008/07/09/scaling-up-reporting-services-2008-vs-reporting-services-2005-lessons-learned.aspx"&gt;http://sqlcat.com/technicalnotes/archive/2008/07/09/scaling-up-reporting-services-2008-vs-reporting-services-2005-lessons-learned.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Quoting from the summary (emphasis is mine):&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Reporting Services 2008 was &lt;strong&gt;able to respond to 3–4 times the total number of users and their requests on the same hardware&lt;/strong&gt; without HTTP 503 Service Is Unavailable errors compared with Reporting Services 2005, regardless of the type of renderer. In stark contrast, Reporting Services 2005 generated excessive HTTP 503 Service Is Unavailable errors as the number of users and their requests increased, regardless of the report renderer.  &lt;p&gt;Our tests clearly show that &lt;strong&gt;the new memory management architecture of the report server enables Reporting Services 2008 to scale very well&lt;/strong&gt;, particularly on the new four-processor, quad-core processors. With our test workload, Reporting Services 2008 consistently outperformed SQL Server 2005 with the PDF and XLS renderers on the four-processor, quad-core hardware platform (16 cores) both in terms of response time and in terms of total throughput. Furthermore, with these renderers on this hardware platform, Reporting Services dramatically outperformed other hardware platforms regardless of Reporting Services version, responding to 3–5 times the number of requests than when running on either of the other hardware platforms. As a result, we recommend that you scale up to four-processor, quad-core servers for performance and scale out to a two-node deployment for high availability. Thereafter, as demand for more capacity occurs, add more four-processor, quad-core servers.&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8717463" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>All those temporary files (RSTempFiles)</title><link>http://blogs.msdn.com/b/jgalla/archive/2008/06/30/all-those-temporary-files-rstempfiles.aspx</link><pubDate>Mon, 30 Jun 2008 21:04:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8672098</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=8672098</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2008/06/30/all-those-temporary-files-rstempfiles.aspx#comments</comments><description>&lt;p&gt;When you install Reporting Services, we create a few directories:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;LogFiles&lt;/li&gt; &lt;li&gt;ReportManager&lt;/li&gt; &lt;li&gt;ReportServer&lt;/li&gt; &lt;li&gt;RSTempFiles&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Most of these are fairly self explanatory.&amp;nbsp; LogFiles... well we put our log files in there.&amp;nbsp; ReportManager contains the Report Manager application (what you get when you browse to &lt;a href="http://&amp;lt;server&amp;gt;/reports"&gt;http://&amp;lt;server&amp;gt;/reports&lt;/a&gt;) and ReportServer contains the Report Server application which is the proper 'Report Server' which implements our Web Service and HTTP handler endpoints... it is what you get when you go to &lt;a href="http://&amp;lt;server&amp;gt;/reportserver"&gt;http://&amp;lt;server&amp;gt;/reportserver&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;So what about that RSTempFiles thing?&amp;nbsp; Well it contains files that are temporary of course!&lt;/p&gt; &lt;p&gt;These temporary files can be broken down into a few categories:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Temporary Report Snapshot files.&lt;/li&gt; &lt;ul&gt; &lt;li&gt;These files are only created if you have &lt;a href="http://msdn.microsoft.com/en-us/library/ms157273.aspx"&gt;opted into using temporary file storage&lt;/a&gt;&amp;nbsp;(see the WebServiceUseFileShareStorage).&lt;/li&gt; &lt;li&gt;&lt;strong&gt;For RS2000/2005&lt;/strong&gt;, snapshots are more or less completely independent and each is contained in its own directory (identified by a GUID).&amp;nbsp; Each snapshot contains a set of files (internally, they are referred to as "chunks").&amp;nbsp; &lt;/li&gt; &lt;li&gt;&lt;strong&gt;For RS2008&lt;/strong&gt;, snapshots oftentimes contain some shared data.&amp;nbsp; The folder-per-snapshot hierarchy used in RS2000/2005 is replaced by a single directory called "Chunks."&amp;nbsp; Each chunk is a discrete file in this directory.&lt;/li&gt; &lt;li&gt;These files are automatically cleaned up by the Report Server on a time-based interval (same as snapshot data stored in ReportServer and ReportServerTempDB catalog databases).&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Output/Intermediate Streams&lt;/li&gt; &lt;ul&gt; &lt;li&gt;These files are all created directly within the the RSTempFiles directory.&amp;nbsp; There is no way to differentiate between these two sub-categories of files currently.&lt;/li&gt; &lt;li&gt;Output streams - these streams are generated as output from the renderers.&amp;nbsp; The server spools them to disk if they grow large enough.&amp;nbsp; RS has an output cache that may cause these streams to survive beyond the lifetime of the request so that subsequent accesses can be served directly from the cache.&amp;nbsp; &lt;/li&gt; &lt;li&gt;Intermediate files - these files contain results of intermediate calculations during report processing and rendering.&amp;nbsp; Generally, these contain data which is never returned to the client, but rather holds temporary results in order to relieve memory pressure.&amp;nbsp; These files are cleaned up when the&amp;nbsp;request completes (no caching across requests).&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Conversion files&lt;/li&gt; &lt;ul&gt; &lt;li&gt;These are stored under a folder named _Conversion.&amp;nbsp; &lt;/li&gt; &lt;li&gt;Our compression format for snapshots changed between RS2000 and RS2005.&amp;nbsp; This folder would contain temporary files supporting the on-demand one-time upgrade of these persisted snapshots.&amp;nbsp; Unless you are upgrading from an RS2000 instance, you should never see this directory or files created.&amp;nbsp; &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Shadow Copy Files&lt;/li&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;This is only for RS2008.&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;After the CTP6 release of RS2008, we enabled shadow copy for our ASP.Net worker domains under the new hosting model.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8672098" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>Joel on Martian Headsets (standards)</title><link>http://blogs.msdn.com/b/jgalla/archive/2008/03/17/joel-on-martian-headsets-standards.aspx</link><pubDate>Mon, 17 Mar 2008 23:00:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8294506</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=8294506</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2008/03/17/joel-on-martian-headsets-standards.aspx#comments</comments><description>&lt;p&gt;I'm generally not a big fan of the "link dump" style blog.&amp;nbsp; However, the latest post on &lt;a href="http://www.joelonsoftware.com/items/2008/03/17.html"&gt;Joel On Software regarding web standards&lt;/a&gt;&amp;nbsp;was too good not to share.&lt;/p&gt; &lt;p&gt;Some choice quotes...&lt;/p&gt; &lt;p&gt;Regarding "working around" problems in an implementation (bolded by me):&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;And eventually some tedious bore writes a lengthy article on her blog explaining a trick you can use to make Qxyzrhjjjjukltk 5.0 behave just like FireQx 3.0 through taking advantage of a bug in Qxyzrhjjjjukltk 5.0 in which you trick Qxyzrhjjjjukltk into deciding that it’s raining when it’s snowing by melting a little bit of the snow, &lt;strong&gt;and it’s ridiculous, but everyone does it&lt;/strong&gt;, because they have to solve the &lt;em&gt;hasLayout&lt;/em&gt; incompatibility. Then the Qxyzrhjjjjukltk team fixes that bug in 6.0, and you’re screwed again, and you have to go find some new bug to exploit to make your windshield-wiper-equipped headphone work with either device.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Regarding language used in a&amp;nbsp;lot of standards documents:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Those documents are &lt;em&gt;super&lt;/em&gt; confusing. The specs are full of statements &lt;a href="http://www.w3.org/TR/CSS21/visuren.html"&gt;like&lt;/a&gt; “If a sibling block box (that does not float and is not absolutely positioned) follows the run-in box, the run-in box becomes the first inline box of the block box. A run-in cannot run in to a block that already starts with a run-in or that itself is a run-in.” Whenever I read things like that, I wonder how &lt;em&gt;anyone&lt;/em&gt; correctly conforms to the spec.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;That one I have a lot of sympathy for.&amp;nbsp; In a previous life, I worked as&amp;nbsp;a tester on the XML datatype implementation in SQL Server 2005.&amp;nbsp; There was a quite a bit of time spent going through various W3C specs on XQuery, XPath, and XSD.&amp;nbsp; IMO, the specs are &lt;strong&gt;insane&lt;/strong&gt;.&amp;nbsp;&amp;nbsp;In some cases they go into excruciating detail about the internal semantics of a particular operation -- as an example the &lt;a href="http://www.w3.org/TR/xquery-semantics/#id-path-expressions"&gt;XQuery 1.0 Formal Semantics spec&lt;/a&gt; says that path expressions should have the same semantics as (ie, they should normalize to) the XQuery for statement.&amp;nbsp; In other words, an expression like /foo/bar/baz should look like a set of nested loops.&amp;nbsp; Unfortunately, it also defines that the normalization process of each sub-expression (a relative path expression) should return the results in document order. There are a couple of problems here (directly related to SQL Server's implementation).&amp;nbsp; First of all, SQL Server uses static typing, and for breaks static typing because it implies zero-or-many cardinality.&amp;nbsp; This breaks functions which require a singleton unless you really want to put (/foo/baz)[1] around everything (note if you are using untyped xml, you need to do this anyways -- sorry).&amp;nbsp; AFAIK, SQL Server is not conformant in this regard (it has been a while though, so maybe I am missing something).&amp;nbsp; The other big hangup I have is that the implication of document ordering at each step in the path seems to preclude the potential for a more global optimization where you defer sorting until the very last step.&lt;/p&gt; &lt;p&gt;One of the major takeaways that I had from Joel's post was that it is incredibly difficult to implement against a standard when that standard actually has no implementation.&amp;nbsp; I don't know if it is possible to get around this.&amp;nbsp; Some standards are amazingly complex -- I can't imagine there being a reference implementation which is so robust that it becomes the standard.&amp;nbsp; Maybe&amp;nbsp;if&amp;nbsp;you go into the whole standards argument saying that the implementation _is_ the standard then you are better off, but I suppose that has its own problems as well.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8294506" width="1" height="1"&gt;</description></item><item><title>More on SSRS 2008 memory management</title><link>http://blogs.msdn.com/b/jgalla/archive/2008/03/11/more-on-ssrs-2008-memory-management.aspx</link><pubDate>Wed, 12 Mar 2008 04:17:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8164731</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=8164731</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2008/03/11/more-on-ssrs-2008-memory-management.aspx#comments</comments><description>&lt;p&gt;This is a continuation of a &lt;a href="http://blogs.msdn.com/jgalla/archive/2007/12/10/memory-management-in-reporting-services-2008.aspx"&gt;previous posting that I made&lt;/a&gt; which introduced some of the memory management functionality in SSRS 2008.&amp;nbsp; In this post, I wanted to dig a bit more into the details of the system in order to illuminate some of the decisions that are happening under the covers.&amp;nbsp; &lt;/p&gt; &lt;p&gt;In order to get the system into a memory constrained state, I have configured the server to only use ~256MB of memory.&amp;nbsp; You can read about how to do this in this &lt;a href="http://technet.microsoft.com/en-us/library/ms159206(SQL.100).aspx"&gt;books online article entitled Configuring Available Memory for Report Server Applications&lt;/a&gt;.&amp;nbsp; I also set the "appdomainmanager" trace level to 4, which is the "Verbose" setting.&amp;nbsp; I wouldn't recommend having a production system run with this tracelevel since the memory management output can get pretty spammy when the system is under pressure and notifications are firing rapidly.&amp;nbsp; &lt;/p&gt; &lt;p&gt;I then ran a pretty simple report that has 100K rows.&lt;/p&gt; &lt;p&gt;So lets dig into the log file a bit.&amp;nbsp; The first couple of lines look like this:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;appdomainmanager!DefaultDomain!aec!03/11/2008-16:56:17:: v VERBOSE: Received NotifyMemoryPressure(pressureLevel=MediumPressure, kBytesToFree=6056)&lt;br&gt;appdomainmanager!WindowsService_1!aec!03/11/2008-16:56:18:: v VERBOSE: Memory Statistics: 0 items, 0KB Audited, 0KB Freeable, 295544KB Private Bytes&lt;br&gt;appdomainmanager!DefaultDomain!aec!03/11/2008-16:56:18:: v VERBOSE: Appdomain (WindowsService) attempted to free 0 KB.&lt;br&gt;appdomainmanager!ReportServer_0-2!aec!03/11/2008-16:56:18:: v VERBOSE: Memory Statistics: 3 items, 83654KB Audited, 78534KB Freeable, 296900KB Private Bytes&lt;/font&gt;&lt;/p&gt; &lt;p&gt;This is basically telling the state of the current system.&amp;nbsp; We have two worker appdomains (WindowsService and ReportServer).&amp;nbsp; WindowsService is used for background processing (subscriptions) and the ReportServer appdomain handles all of the interactive requests from our HTTP endpoint (including all management operations such as publishing reports, creating folders, etc...)&amp;nbsp; In my test, I wasn't running any subscriptions, and you can tell that there were "0 items" reported.&amp;nbsp; However, I was running a single report interactively in the ReportServer appdomain.&amp;nbsp; You can see there that we indicated that there were "3 items."&amp;nbsp; What are these items?&amp;nbsp; As you might remember from the previous post, there is not a direct 1:1 mapping between "memory consumers" and requests.&amp;nbsp; Typically there are 3 "memory consumers" per request... this is a bit of an implementation detail about how out report processing and rendering engine divides up the large memory consuming components.&amp;nbsp; Additionally, you can see that a total of ~84MB was discovered as being used by these consumers, of which ~79MB is considered freeable.&amp;nbsp; We also report that we are currently using ~289MB private bytes.&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;appdomainmanager!DefaultDomain!aec!03/11/2008-16:56:18:: v VERBOSE: Appdomain (ReportServer) attempted to free 6056 KB.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;This line is telling us that some consumer in the ReportServer domain agreed to try to release ~6MB of memory (which is equal to the amount we were trying to free in the previous request).&amp;nbsp; Some additional time passes, and we recieve another memory notification.&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;appdomainmanager!DefaultDomain!aec!03/11/2008-16:56:19:: v VERBOSE: Received NotifyMemoryPressure(pressureLevel=HighPressure, kBytesToFree=25120)&lt;br&gt;appdomainmanager!WindowsService_1!aec!03/11/2008-16:56:19:: v VERBOSE: Skipping shrink request for appdomain (WindowsService_1) because no memory consuming requests are registered.&lt;br&gt;appdomainmanager!ReportServer_0-2!aec!03/11/2008-16:56:19:: v VERBOSE: 1057 ms has elapsed since last memory shrink attempt for this appdomain (ReportServer_0-2-128497526482384832)&lt;br&gt;appdomainmanager!ReportServer_0-2!aec!03/11/2008-16:56:19:: v VERBOSE: Memory Statistics: 3 items, 77765KB Audited, 72645KB Freeable, 313648KB Private Bytes&lt;br&gt;processing!ReportServer_0-2!aec!03/11/2008-16:56:19:: w WARN: Processing Scalability -- Memory Shrink Request Received&lt;br&gt;appdomainmanager!DefaultDomain!aec!03/11/2008-16:56:19:: v VERBOSE: Appdomain (ReportServer) attempted to free 25120 KB.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;From this, we can determine that the original memory shrink was not aggressive enough, and there are other consumers which are still allocating memory.&amp;nbsp; Note that the memory pressure is now "High."&amp;nbsp; However, note that the audited memory has actually been reduced from the previous iteration.&amp;nbsp; In general, the reason why this happens is that there are memory allocations that happen outside of the areas which are strictly controlled and audited (remember the CLR shares a single global heap for all code running in all appdomains).&amp;nbsp; Since we are in a high pressure state, in addition to requesting the large consumers to reduce memory usage, we will also instruct all memory consumers to freeze their current allocation so they do not grow larger.&lt;/p&gt; &lt;p&gt;As time passes, the processing and rendering engines continue to work on the report, the log shows additional memory shrink notifications which I am not going to duplicate here.&amp;nbsp; The majority of them look like this:&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;appdomainmanager!ReportServer_0-2!aec!03/11/2008-16:56:50:: v VERBOSE: Skipping shrink request for appdomain (ReportServer_0-2-128497526482384832) because no memory consuming requests have been added.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Indicating that we are not taking additional action because we have detected that no additional requests have been added to the system.&amp;nbsp; Internally, we use a time based heuristic here to basically bail out of the shrink notification early if we believe that we are not going to do any productive activity.&lt;/p&gt; &lt;p&gt;Eventually, about 30 seconds after starting execution of the report, we finish rendering it, and the following line is output to the log file:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;webserver!ReportServer_0-2!9d0!03/11/2008-16:56:52:: i INFO: Processed report. Report='/homeadvisor_rowparameters', Stream=''&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Ok, well hopefully that has given a little bit of insight into the system that we are using, and shows how you can examine the log file to get some details into the decisions that are happening.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8164731" width="1" height="1"&gt;</description></item><item><title>Where has John been?</title><link>http://blogs.msdn.com/b/jgalla/archive/2008/03/11/where-has-john-been.aspx</link><pubDate>Tue, 11 Mar 2008 20:35:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8156067</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=8156067</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2008/03/11/where-has-john-been.aspx#comments</comments><description>&lt;p&gt;Ok, it has been a little while.&amp;nbsp; But I have been &lt;a href="http://sjuptq.bay.livefilestore.com/y1pxstORRmEScKpPOTgKFYW0XmKcDMytVjHQo2jCwpoprzO0VHRuI1fgCbwN7rY-w5P6lJv2qjRSkpOd2fBM5dLI95mw6Cq1rSQ?PARTNER=WRITER" target="_blank"&gt;pretty&lt;/a&gt; &lt;a href="http://ffihwg.bay.livefilestore.com/y1puBTiCHvEa1SQwWEBq_i53uG9lJVv8qG60KBwBSjedljFL3b1_zG9f-qHSaB_yw-_P6aYte0koWmgc9Ra116TPw"&gt;busy&lt;/a&gt; &lt;a href="http://4d1ftw.bay.livefilestore.com/y1puBTiCHvEa1TRe7YiYPlkdAu_m_PQzeoBNnzGkTLwrQLLU1jk5mDorW59kQD5MFVVhWHY1V5ereR5cGZ3I8JiPQ"&gt;lately&lt;/a&gt;.&amp;nbsp; His name is Christopher.&lt;/p&gt; &lt;p&gt;We have also been pretty busy locking down Katmai to get CTP6 (aka known as the "February CTP") out the door and working bugs.&amp;nbsp; I recommend that people head over towards the &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1624&amp;amp;SiteID=1"&gt;"Katmai" forum on MSDN for Reporting Services&lt;/a&gt; if you have any questions.&amp;nbsp; There are lots of people there willing to answer questions and otherwise help out.&lt;/p&gt; &lt;p&gt;So what now?&amp;nbsp; I owe a part two post on some of the memory management stuff we are introducing in Reporting Services 2008.&amp;nbsp; I'm getting all of the info put together now, and the post should be up shortly.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8156067" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/Personal/">Personal</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>Memory Management in Reporting Services 2008</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/12/10/memory-management-in-reporting-services-2008.aspx</link><pubDate>Tue, 11 Dec 2007 01:14:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6728024</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=6728024</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/12/10/memory-management-in-reporting-services-2008.aspx#comments</comments><description>&lt;p&gt;One of the big pushes for SSRS 2008 has been to reduce the occurrence of OutOfMemoryExceptions caused during report execution.&amp;#160; A lot of work has gone into making this happen throughout the report rendering stack, including significant changes in the report processing engine to move a definition based object model as opposed to an instance based one.&amp;#160; I can't take the credit for this massive undertaking, but I did work on some of the supporting infrastructure to ensure that components of the report processing and rendering engines can make more efficient usage of the memory on the box while reducing the likelihood of OOM.&amp;#160; This is probably going to be a multi-part discussion, with the first going over some of the internal infrastructure, and the next drilling more into specifics with examples of the memory monitoring component in action.&lt;/p&gt;  &lt;p&gt;One of the upfront design decisions that we made was the processing and rendering engines would continue to be managed code.&amp;#160; This decision essentially means that they continue to allocate memory from a shared pool -- the CLR managed heap.&amp;#160; Ultimately, it is the managed heap which makes policy decisions on whether or not specific allocations are going to succeed or fail.&amp;#160; From the perspective of our native hosting layer, SSRS 2008 only sees the managed heap as a single large pool of memory and there is no visibility into specific components, requests, or even appdomains.&amp;#160; Given the current hosting interfaces for the CLR, this just is not a tractable problem at this point.&amp;#160; &lt;/p&gt;  &lt;p&gt;Given the design decision to continue to use managed code and thus a shared pool of memory, we opted to go for a two-pronged approach:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Implement/leverage a &lt;strong&gt;process-wide memory notification infrastructure&lt;/strong&gt; to detect when we are approaching/experiencing memory pressure.&lt;/li&gt;    &lt;li&gt;In response to this global notification, determine the &lt;strong&gt;specific memory consumers&lt;/strong&gt; which should be trimmed.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The first was actually already done for us.&amp;#160; SSRS 2008 builds its native hosting layer on top of shared infrastructure from the SQL Server engine which already has memory monitoring components in the form of &lt;a href="http://blogs.msdn.com/slavao/archive/2005/11/05/489459.aspx"&gt;Memory Broker&lt;/a&gt; and other resource monitoring technologies.&amp;#160; These provided us with a configurable and predictive memory management infrastructure.&amp;#160; This is the key first piece.&lt;/p&gt;  &lt;p&gt;The second piece of the puzzle is attributing memory usage to specific consumers.&amp;#160; You will note that I didn't say &amp;quot;requests&amp;quot; here.&amp;#160; Internally, there is a managed infrastructure which specific components can leverage to report their memory usage and receive notifications as to how much memory they should try to free.&amp;#160; This infrastructure is heavily utilized by our report processing and rendering engine to manage the size of data structures which grow as the amount of data in the report grows.&amp;#160; This allows RS to strike a reasonable balance between memory utilization and stability.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here is a rundown of the operations that occur when our native hosting layer detects memory pressure:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Native layer informs managed code that there is pressure and specifies the &lt;strong&gt;total &lt;/strong&gt;amount of memory that must be shrunk.&lt;/li&gt;    &lt;li&gt;Managed layer enumerates all memory consumers (generally 2-3 per report rendering request plus some global objects such as caches).&amp;#160; &lt;/li&gt;    &lt;li&gt;We determine the &lt;strong&gt;minimal subset of memory consumers&lt;/strong&gt; that have to be trimmed in order to satisfy the shrink request.&lt;/li&gt;    &lt;ol&gt;     &lt;li&gt;Actually -- there is a a bit of special sauce here.&amp;#160; Each component also gives the centralized memory manager information about &amp;quot;how difficult&amp;quot; it is to shrink its memory usage and this is factored into determining whom to shrink.&lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p&gt;Step (3) is pretty actually interesting and is a key design decision for SSRS.&amp;#160; An alternative approach would be to perform more of a &amp;quot;fair share&amp;quot; approach to trimming memory usage.&amp;#160; The decision to minimize the number of components which are shrunk is really driven by the fact that a memory shrink operation is somewhat heavyweight.&amp;#160; The vast majority of components which subscribe to these events store everything in memory up until the point they receive the notification.&amp;#160; In general, these consumers are things like lists and dictionaries which are required to keep track of things that are put into them -- they can't just evict entries like a cache may be able to.&amp;#160; So in order to begin to use less memory, these data structures have to fall back to a mixed disk/memory mode which requires serializing a portion of their state to disk.&amp;#160; In order to keep things running as fast as possible when we are not under memory pressure, all of this serialization happens when they receive the shrink notification.&amp;#160; So you can imagine what would happen if we went with a fair share approach where every request is asked to trim some memory.&amp;#160; Each request currently being processed would grind to a halt as they race to serialize their state to disk.&amp;#160; Instead, with our approach what happens is a small fraction of requests (usually the big memory hogs) are temporarily suspended while they serialize some state to disk, and other requests are to a large degree unaffected.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6728024" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>Ensuring up to date results through URL Access</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/10/24/ensuring-up-to-date-results-through-url-access.aspx</link><pubDate>Wed, 24 Oct 2007 21:04:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5654961</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=5654961</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/10/24/ensuring-up-to-date-results-through-url-access.aspx#comments</comments><description>&lt;p&gt;A pretty common pattern that I see exporting of reports through URL Access using a simple hyperlink.&amp;nbsp; The hyperlink usually looks something like this:&lt;/p&gt; &lt;p&gt;&amp;lt;a href="http://localhost/reportserver/?/SalesData&amp;amp;rs:Command=Render&amp;amp;rs:Format=EXCEL"&amp;gt;Sales Data in Excel Format&amp;lt;/a&amp;gt;&lt;/p&gt; &lt;p&gt;At first glance, it doesn't appear that there is anything wrong with this.&amp;nbsp; However, if you are working in an environment where the data is highly volatile and the user needs to click on the link multiple times and see up to date information then you could experience some problems.&amp;nbsp; To understand why you encountering problems, you need to first understand that implicitly when you access a report through the Report Server, you are estabilishing a "session" with the server.&amp;nbsp; Fundamentally a session is a binding between a user, the report, and the data&amp;nbsp;in that report.&amp;nbsp; We use session to ensure that when you navigate between pages and otherwise interact with the report that the data within the report remains consistent.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Ok, so what does this have to do with the URL above?&amp;nbsp; Well, when a user clicks on that URL, we create a session for the user, and pass back a cookie their web browser which will identifier that session later on to the server so we can find the correct instance of the report with the data that was in it.&amp;nbsp; If the user, within that same IE session, clicks on the report again, and assuming the session hasn't timed out (10 minutes by default), we actually render the report out of the cached data that has been bound to that user session.&amp;nbsp; I know --&amp;nbsp;disaster, right?&amp;nbsp; The user was expecting to see that billion dollar deal that they just closed and instead they are just reminded that they haven't meant the numbers for October yet.&amp;nbsp; &lt;/p&gt; &lt;p&gt;So what do we do about it?&amp;nbsp; Well, there is actually an rs:* parameter which tells the server "Hey, I know that you already have a session created for this user, but forget about it for right now, and create a new one", that parameter is &lt;a href="http://msdn2.microsoft.com/en-us/library/ms153610.aspx"&gt;rs:ClearSession=true&lt;/a&gt;.&amp;nbsp; By providing the rs:ClearSession=true parameter along with the request to the report server, you are ensuring that the server constructs a new session for the user and runs the report from a clean state, ensuring (assuming you have the report configured to use live execution) that the user will see the most up to date information possible.&amp;nbsp; The nice thing about the rs:ClearSession=true parameter is that if there is not already a session estabilished, it is a no-op.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5654961" width="1" height="1"&gt;</description></item><item><title>Back from a blogging vacation?</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/09/11/back-from-a-blogging-vacation.aspx</link><pubDate>Tue, 11 Sep 2007 21:35:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4868618</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=4868618</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/09/11/back-from-a-blogging-vacation.aspx#comments</comments><description>&lt;p&gt;I guess it was an unintended vacation.&amp;#xA0; We've been busy here in the Reporting Services team.&amp;#xA0; CTP5 of SQL Server 2008 was a large milestone for us as it really started to put together all of the work we have been doing to make the processing engine more scalable as well as nail down some of the hard issues with our new native hosting layer.&amp;#xA0; I know you can't get your hands on it quite yet, but for the most part the major development work has been completed except for the setup and upgrade bits.&amp;#xA0; &lt;/p&gt;  &lt;p&gt;Speaking of our native hosting layer, &lt;a href="http://blogs.msdn.com/jameswu/"&gt;James Wu has just started a blog&lt;/a&gt;.&amp;#xA0; James did a lot (all?) of the initial prototyping work for our new native hosting infrastructure including integration with SQLOS and other technologies from the SQL Engine team.&amp;#xA0; Hopefully over the coming months James will provide a good bit of information about the native hosting layer and its impact on users, and maybe even a good story or two about the development process.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4868618" width="1" height="1"&gt;</description></item><item><title>SQL Server 2008 (Katmai) and Reporting Services</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/06/04/sql-server-2008-quot-katmai-quot-amp-reporting-services.aspx</link><pubDate>Mon, 04 Jun 2007 23:59:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3085908</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=3085908</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/06/04/sql-server-2008-quot-katmai-quot-amp-reporting-services.aspx#comments</comments><description>&lt;p&gt;Today the first public release of SQL Server 2008 is shipping.&amp;nbsp; Of course, Reporting Services is still there in the box.&amp;nbsp; You can find general information about the release here:&lt;/p&gt; &lt;p&gt;&lt;a title="https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5395&amp;amp;wa=wsignin1.0" href="https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5395&amp;amp;wa=wsignin1.0"&gt;https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5395&amp;amp;wa=wsignin1.0&lt;/a&gt;&lt;/p&gt; &lt;p&gt;There are also some &lt;a href="http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=428&amp;amp;SiteID=1"&gt;Katmai specific MSDN forums&lt;/a&gt;, and a &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1624&amp;amp;SiteID=1"&gt;Katmai Reporting Services MSDN forum&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3085908" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>EMF Rendering and Persisted Streams</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/05/24/emf-rendering-and-persisted-streams.aspx</link><pubDate>Fri, 25 May 2007 03:49:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2855632</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=2855632</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/05/24/emf-rendering-and-persisted-streams.aspx#comments</comments><description>&lt;p&gt;EMF rendering in Reporting Services has an interesting history.&amp;nbsp; When SSRS first shipped, we did not support "direct printing" from within the web interface.&amp;nbsp; Customers revolted.&amp;nbsp; They wanted a "Print" button on the toolbar which would provide a full featured print experience.&amp;nbsp; Many other web applications don't actually do this, choosing instead to present the user with a "printable" HTML page or some other format such as PDF which they then print within their PDF reader.&amp;nbsp; Rather than this workaround though, it was decided that we would implement an EMF renderer and provide a client-side ActiveX control which would send the EMF to the print spooler.&lt;/p&gt; &lt;p&gt;Turns out EMF has an interesting characteristic though.&amp;nbsp; Each page is a discrete stream.&amp;nbsp; Normally, this wouldn't cause&amp;nbsp;a problem, but due to how renderers were architected, the cost&amp;nbsp;restarting the renderer on a&amp;nbsp;specific page&amp;nbsp;is a function of which page it is within the report.&amp;nbsp; Specifically, when you request page N of the report from the EMF renderer, it needs to &lt;em&gt;find&lt;/em&gt;&amp;nbsp;page N, which means essentially internally walking across pages 1...N-1 in order to position itself on page N.&amp;nbsp; A quick back of the envelope calculation will tell you then that the cost of printing a report by requesting each page independently has an algorithmic complexity of&lt;/p&gt; &lt;p&gt;&lt;img height="67" src="http://blogs.msdn.com/blogfiles/jgalla/WindowsLiveWriter/EMFRenderingandPersistedStreams_B8F5/clip_image00241%5B4%5D.gif" width="161"&gt;&lt;/p&gt; &lt;p&gt;Where R(i) is the time to independently render a page, and T(i) is the time it takes to "paginate through" a given page without actually writing anything to the response stream.&amp;nbsp; This is not good.&amp;nbsp; Adjusting the way that the EMF renderer operated would require too much of a redesign to our processing and rendering architecture, so it was decided to instead address this issue by adding a new feature to the server.&amp;nbsp; This feature was "Persisted Streams."&amp;nbsp; When this mode is enabled, all of the requested streams are rendered in one pass from the EMF renderer so we don't incur the cost of restarting the renderer on a particular page.&amp;nbsp; The server returns the initial request when the first page is completed, and continues in the background to collect pages from the renderer and store them until they are requested by the client.&amp;nbsp; From the clients perspective, you merely keep requesting pages until the server returns an empty stream, which indicates that the report has finished rendering.&amp;nbsp;&amp;nbsp;There are a&amp;nbsp;couple of&amp;nbsp;limitations to using the Persisted Streams feature though:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;It is only accessible via the URL Access endpoint, and not via our SOAP APIs.&amp;nbsp; Unfortunately, this is what happens when features are implemented in a service pack.&amp;nbsp; It was only needed for a very narrow scenario, so from an implementation perspective we did not choose to incur the cost of making it available to our SOAP API.  &lt;li&gt;It is kind of a "stateful" API, meaning that once you have read a stream, you cannot read it again.&amp;nbsp; So make sure you get it right the first time because you can't go back.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Here is some sample code that demonstrates how use our URL Access endpoint to retrieve streams in this fashion:&amp;nbsp;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1a920765-1b9c-490a-8096-e3c9888fbc90" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; requestUri &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt;
                &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt;.Format(&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;https://{0}/reportserver?{1}&amp;amp;rs:Command=Render&amp;amp;rs:Format=IMAGE&amp;amp;rc:OutputFormat=EMF&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;,
                m_serverName, m_reportPath);

            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;const&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; persistStreams &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;amp;rs:PersistStreams=true&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;;
            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;const&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; getNextStream &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;amp;rs:GetNextStream=true&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;;
            CookieContainer cookies &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; CookieContainer();
            WebRequest request &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; WebRequest.Create(requestUri &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; persistStreams);
            (request &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;as&lt;/span&gt;&lt;span style="color: #000000; "&gt; HttpWebRequest).CookieContainer &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; cookies;
            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;try&lt;/span&gt;&lt;span style="color: #000000; "&gt;
            {
                &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;while&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;true&lt;/span&gt;&lt;span style="color: #000000; "&gt;)
                {
                    request.UseDefaultCredentials &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;true&lt;/span&gt;&lt;span style="color: #000000; "&gt;;
                    
                    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; (WebResponse response &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; request.GetResponse())
                    {
                        Stream s &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; response.GetResponseStream();
                        BufferedStream buffered &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; BufferedStream(s);
                        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;if&lt;/span&gt;&lt;span style="color: #000000; "&gt; (OnReceivedStream(buffered))
                        {
                            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;break&lt;/span&gt;&lt;span style="color: #000000; "&gt;;
                        }

                        request &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; WebRequest.Create(requestUri &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; getNextStream);
                        (request &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;as&lt;/span&gt;&lt;span style="color: #000000; "&gt; HttpWebRequest).CookieContainer &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; cookies;
                    }
                }
            }
            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;catch&lt;/span&gt;&lt;span style="color: #000000; "&gt; (WebException ex)
            {                
                OnReceivedException(ex);
            }&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Obviously, this code is not 100% complete.&amp;nbsp; It is part of a larger piece of a WinForms application that I have written which excercises this functionality.&amp;nbsp; It should be enough to get you started though.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2855632" width="1" height="1"&gt;</description></item><item><title>Diagnosing Reporting Services Issues</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/03/29/diagnosing-reporting-services-issues.aspx</link><pubDate>Thu, 29 Mar 2007 19:36:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1989453</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=1989453</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/03/29/diagnosing-reporting-services-issues.aspx#comments</comments><description>&lt;p&gt;I was poking around some other SSRS blogs from folks here on the product team, and I found &lt;a href="http://blogs.msdn.com/lukaszp/archive/2007/01/31/how-to-diagnose-issues-when-running-reports-in-the-report-server.aspx" target="_blank"&gt;this post from Lukasz about troubleshooting Reporting Services&lt;/a&gt;.&amp;nbsp; It is a great overview of some of the guidance we have given in the form of whitepapers, KB artciles, and a bunch of other sources.&amp;nbsp; I highly recommend you give it a read and bookmark it so you can use it is your "playbook" when running into problems.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1989453" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>ReportServerTempDB IO Saturation</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/03/21/reportservertempdb-io-saturation.aspx</link><pubDate>Wed, 21 Mar 2007 21:09:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1926994</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=1926994</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/03/21/reportservertempdb-io-saturation.aspx#comments</comments><description>&lt;p&gt;Reporting Services uses a temporary database for storage of objects which are, well, &lt;em&gt;temporary&lt;/em&gt;.&amp;nbsp; For example, report snapshots which are associated with a particular user session as the result of a live execution.&amp;nbsp; Cached report snapshots are also stored here because they begin life as a result of a live report execution.&amp;nbsp; This means that in systems where there are a lot of live report executions happening, we are churning through a lot of data in the ReportServerTempDB.&amp;nbsp; As your system scales out or up, you will undoubtedly experience&amp;nbsp;a problem where you will begin to saturate the IO subsystem hosting the ReportServerTempDB.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Do I have an IO throughput issue?&lt;/strong&gt;&amp;nbsp; &lt;/p&gt; &lt;p&gt;There are lots of really great articles written about this topic, but&amp;nbsp;in general there are a couple of things which I look at:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Perfmon counters for Physical Disk Usage:  &lt;ul&gt; &lt;li&gt;Avg. Disk Sec/Read  &lt;li&gt;Avg. Disk Sec/Write&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Check SQL Server&amp;nbsp;Wait types  &lt;ul&gt; &lt;li&gt;sys.dm_os_wait_stats  &lt;li&gt;Look for high counts of wait stats like IO_COMPLETION, ASYNC_IO_COMPLETION, and the PAGELATCH_* class of waits&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Ideally, you want to see Avg Disk Sec/Read or Write to be &amp;lt; 10ms.&amp;nbsp;If you start seeing these counters creep over 50ms, then you are probably getting into a situation where the disk is not keeping up with the incoming rate of IO requests and this is causing waits.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;So how do I deal with it?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The answer is pretty straightforward.&amp;nbsp; You start adding more disks to handle the IO load on the ReportServerTempDB.&amp;nbsp; Doing this is actually pretty easy.&amp;nbsp; From within Management Studio, find the ReportServerTempDB database in the Object Explorer.&amp;nbsp; Right click and go to properties.&amp;nbsp; From the tabs on the left side of the Database Properties dialog, you will see a "Files" section, go to that guy and start adding files.&amp;nbsp; Of course, you will want to spread the files across multiple disks if you are trying to increase IO performance.&amp;nbsp; Additionally, I would recommend sizing the files to an appropriate value rather than relying on autogrowth since autogrowth can cause performance issues when SQL Server actually has to grow the files.&amp;nbsp; The exact value will be a function of how much data is incoming.&amp;nbsp; An important fact to keep in mind though is that the ReportServerTempDB database should automatically remove "stale" data as user sessions and cached reports expire, so the data shouldn't in general continuously grow.&lt;/p&gt; &lt;p&gt;Once you have created the additional data files, SQL Server will automatically begin to load balance IO operations across the various files, so there shouldn't be anything else you have to do.&amp;nbsp; Nice!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1926994" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item><item><title>Aggregating rsExecutionNotFound Posts</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/02/01/aggregating-rsexecutionnotfound-posts.aspx</link><pubDate>Thu, 01 Feb 2007 20:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1574381</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=1574381</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/02/01/aggregating-rsexecutionnotfound-posts.aspx#comments</comments><description>&lt;P&gt;The posts about things dealing with rsExecutionNotFound seem to be what people find most interesting these days.&amp;nbsp; In order to aggregate the posts into one place, I will be adding links that deal with this error here. &lt;/P&gt;
&lt;P&gt;Maybe I will add a tag as well...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A title="Careful when using rc-Toolbar=false" href="http://blogs.msdn.com/jgalla/archive/2007/01/31/careful-when-using-rc-toolbar-false.aspx" mce_href="http://blogs.msdn.com/jgalla/archive/2007/01/31/careful-when-using-rc-toolbar-false.aspx"&gt;Careful when using rc-Toolbar=false&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A title="Session Timeout during execution" href="http://blogs.msdn.com/jgalla/archive/2006/10/11/session-timeout-during-execution.aspx" mce_href="http://blogs.msdn.com/jgalla/archive/2006/10/11/session-timeout-during-execution.aspx"&gt;Session Timeout during execution&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1574381" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/rsExecutionNotFound/">rsExecutionNotFound</category></item><item><title>Careful when using rc:Toolbar=false</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/01/31/careful-when-using-rc-toolbar-false.aspx</link><pubDate>Thu, 01 Feb 2007 02:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1568185</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=1568185</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/01/31/careful-when-using-rc-toolbar-false.aspx#comments</comments><description>&lt;P&gt;I'm in the middle of reinstalling Visual Studio, and so I thought I would share an interesting story from a couple of weeks ago.&amp;nbsp; An internal customer (Microsoft-speak for some other team at Microsoft) of Reporting Services was encountering seemingly random rsExecutionNotFound errors when navigating around their application.&amp;nbsp; Of course, things like this are never random and there was a perfectly good explanation.&amp;nbsp; After digging through their application for a little while, and with the help of &lt;A href="http://www.fiddlertool.com/fiddler/" mce_href="http://www.fiddlertool.com/fiddler/"&gt;Fiddler&lt;/A&gt;, I stumbled upon the problem.&amp;nbsp; They were rendering the same report in two different contexts, one of them was specifying rc:Toolbar=false, and the other wasn't.&amp;nbsp; Basically, their call to the report server looked something like this in the two places:&lt;/P&gt;
&lt;P&gt;http://reports/reportserver/?/myreport&amp;amp;rs:Command=Render&amp;amp;rc:Toolbar=false&lt;/P&gt;
&lt;P&gt;http://reports/reportserver/?/myreport&amp;amp;rs:Command=Render&lt;/P&gt;
&lt;P&gt;Now, there is actually a subtle little problem with rendering using rc:Toolbar=false against the ReportServer virtual directory.&amp;nbsp; When this happens in a default installation, the Report Server sends a cookie back to IE to identify the session.&amp;nbsp; This cookie is then passed back to the report server to load up the appropriate snapshot, parameter, data source information, etc to view subsequent pages and images from the report.&amp;nbsp; What would happen is the user would navigate to the page where the report being rendered w/rc:Toolbar=false was sitting, which would give IE the cookie.&amp;nbsp; The user would navigate away from the page, and eventually head to the page where rc:Toolbar=false &lt;STRONG&gt;was not&lt;/STRONG&gt; specified.&amp;nbsp; However, even in this case if the cookie is there, we try to use it to load the user session, which would fail because the session had timed out in the time between the two requests.&amp;nbsp; The user would be greeted with an "Execution Not Found" error message and would have to close and restart IE to get things working again.&lt;/P&gt;
&lt;P&gt;The moral?&amp;nbsp; Don't render against the ReportServer virtual directory using rc:Toolbar=false unless you really know what you are doing, because it is tricky to get right.&amp;nbsp; If you want to render using the ReportServer virutal directory (so you don't have to roll your own &lt;A href="http://www.gotreportviewer.com/" mce_href="http://www.gotreportviewer.com/"&gt;Report Viewer Control ASP.Net application&lt;/A&gt;) then you &lt;A href="http://msdn2.microsoft.com/en-us/library/ms345247.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms345247.aspx"&gt;should build a stylesheet which removes the toolbar, and use that&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1568185" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/rsExecutionNotFound/">rsExecutionNotFound</category></item><item><title>Mono device makes good -- wins award</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/01/17/mono-device-makes-good-wins-award.aspx</link><pubDate>Thu, 18 Jan 2007 09:04:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1487453</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=1487453</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/01/17/mono-device-makes-good-wins-award.aspx#comments</comments><description>&lt;p&gt;From Miguel de Icaza's blog:&lt;/p&gt; &lt;p&gt;&lt;a title="http://tirania.org/blog/archive/2007/Jan-17.html" href="http://tirania.org/blog/archive/2007/Jan-17.html"&gt;http://tirania.org/blog/archive/2007/Jan-17.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I had no idea that the Sansa was running Mono.&amp;nbsp; Personally,&amp;nbsp;I think it is really great that there are multiple implementations of the CLR.&amp;nbsp; It is even cooler that a Mono-based device is being so highly praised.&lt;/p&gt; &lt;p&gt;Good job guys.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1487453" width="1" height="1"&gt;</description></item><item><title>Load Testing Reporting Services</title><link>http://blogs.msdn.com/b/jgalla/archive/2007/01/15/load-testing-reporting-services.aspx</link><pubDate>Tue, 16 Jan 2007 04:52:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1474462</guid><dc:creator>John Gallardo [MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/jgalla/rsscomments.aspx?WeblogPostID=1474462</wfw:commentRss><comments>http://blogs.msdn.com/b/jgalla/archive/2007/01/15/load-testing-reporting-services.aspx#comments</comments><description>&lt;p&gt;This question came across one of our internal discussion aliases, and it wasn't the first time I had seen it... so I thought it might be interesting to other people as well. &lt;/p&gt; &lt;p&gt;Oftentimes, when people configure a load testing tool they set it up so that all of the connections come from the same logical user.&amp;nbsp; However, in Reporting Services we have a feature which prevents an authenticated user from performing a denial-of-service attack against the server.&amp;nbsp; We do this by limiting the number of operations that any given user (based on the user's name) can be performing at any given time.&amp;nbsp; When you hit this limit, you will get an error message like this:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;There are currently too many requests in progress for user: "ABC\XYZ". Please wait until the current requests have finished processing before issuing any more.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;At this point, there are basically two ways of resolving this issue:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Change your test scripts/application to spread the requests across multiple logical users.&lt;/li&gt; &lt;li&gt;Alter the rsReportServer.config file to extend the number of requests a user can have active.&amp;nbsp; The setting is the &amp;lt;Configuration&amp;gt; section and it is the "MaxActiveReqForOneUser" property.&amp;nbsp; The whole entry is this: &amp;lt;Add Key="MaxActiveReqForOneUser" Value="999999" /&amp;gt;.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Note that this setting can also be useful if your users are not talking directly to the server, but are instead going through an ASP.Net application which is always impersonating the same user when accessing SSRS.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1474462" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/Microsoft/">Microsoft</category><category domain="http://blogs.msdn.com/b/jgalla/archive/tags/SSRS/">SSRS</category></item></channel></rss>