Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Security Software Primed for Strong Growth

SAP Touts 'Unwired' Strategy With Sybase

Salesforce Q2 Sees SaaS Paying Off

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2









Related Articles
MSSQL Server Reporting Services: A New Paradigm for Enterprise Reporting
MSSQL Server Reporting Services: The Authoring Phase: Overview Part I
MSSQL Server Reporting Services: The Authoring Phase: Overview Part II

Senior Oracle Implementation Consultant
Thomson Reuters (Tax & Accounting), Inc.
US-OR-Lake Oswego

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MS SQL

August 28, 2007

Report Session Caching in Reporting Services 2005

By William Pearson

Black Belt Administration: Caching Options: Report Session Caching

About the Series ...

This article is a member of the series MSSQL Server Reporting Services. The series is designed to introduce MSSQL Server Reporting Services (“Reporting Services”), presenting an overview of its features, with tips and techniques for real-world use. For more information on the series in general, please see my initial Database Journal article, A New Paradigm for Enterprise Reporting. For the software components, samples and tools needed to complete the hands-on portion of this article, see BlackBelt Administration: Linked Reports in Report Manager, another article within this series.

Introduction

As we have noted in other articles of this series, a common attribute of enterprise reporting systems is their provision for single points of maintenance for various aspects of system configuration. Reporting Services meets the general need for centralized maintenance of reports and their constituent components by housing them within a central “report catalog,” facilitating easier report access and management. Reporting Services provides multiple management options to administrators.

One of many capabilities that Reporting Services offers administrators is caching. During report execution, the three basic steps taken by the Report Server include:

  • Retrieval of data from the specified data source(s);
  • Merging of the retrieved data with the layout information specified by the report author;
  • Generation of the intermediate format of the report (which is next turned into the final report output within the rendering stage).

The Report Server can cache the intermediate format of the report, to shorten the time required to retrieve a report. This accelerated retrieval can mean an improved user experience, particularly in cases where the report is large or accessed frequently. Caching is a performance-enhancement technique that is effective in many cases, although cache content volatility (the tendency of content to change as reports are added, replaced, or removed) as well as other factors, can be a consideration when we choose among the available types of caching.

Within the three-part Black Belt Administration: Caching Options subseries, we will introduce and overview the three types of caching that Reporting Services 2005 offers administrators. The three caching types are Report Session, Report Execution, and Snapshot. In this article, we will explore Report Session caching. As a part of our examination of Report Session caching, we will:

  • Discuss the general purpose of Report Session caching;
  • Review details about how Report Session caching operates in Reporting Services 2005;
  • Explore the settings involved in putting Report Session caching to work, including system defaults for those settings;
  • Include other information about Report Session caching that may prove useful in selecting or discarding this option for use within our own business environments.

Report Session Caching in Reporting Services 2005

The three caching options within Reporting Services 2005 have numerous characteristics in common. One way that Report Session caching differs, however, lies in the fact that it cannot be “disabled” in the purest sense. Unless a report is configured for “snapshot” treatment, its intermediate format is automatically cached – at least for the duration of the report session, a parameter which can, itself, be specified for the Report Server, as we shall see.

Purpose of Report Session Caching

We can begin discussing Report Session caching with a definition of a report session. Each report session is associated with a single, requesting consumer client for a given report. The report session setting represents a modifiable duration of time within which our Report Server is allowed to serve report requests 1) from the same consumer client, and 2) from the same intermediate format that has been cached on the server. The purpose of report session caching is to support a consistent viewing experience during a single browser session (a configurable “report session,” as we have noted).

Because the cached copy of the report (its intermediate format) is used by the consumer until the report session expires, we obtain both enhanced performance (the retrieved dataset is already stored and “waiting” for the consumer – it does not have to be retrieved upon request) and consistent data. Consistency is important, in most cases, in that the report data remains static during the consumer report session – that is, if the source data underlying the report changes during a report session, the data remains fixed within the displayed report, or even when the same data is exported via the Report Server within the same report session.

Details of Report Session Caching Operation

Most of us are aware that Reporting Services stores temporary files within an underlying database to support user sessions and report processing. Each Report Server database uses a related temporary database to store session and execution data, cached reports, and work tables that are generated by the report server. Caching in general occurs for internal use and to support a consistent viewing experience during a single browser session, as we have noted to be so in the case of Report Session caching.

Anytime a report is requested from a given consumer client, Reporting Services caches the intermediate format for the report – not the ultimate report output – within the ReportServerTemp database. Caching the intermediate format means that varied rendering options can still be applied upon the cached data (the intermediate format) to offer the performance benefits of caching (primarily speed and consistency, as we have noted) while still offering flexibility in the appearance of multiple renderings.

As we see in the Illustration 1 below, each client request entails the creation of a report session cache client-report “version” of an intermediate format file. If two consumer clients request the identical report, as is the case with Client A and Client B, each of whom has requested Report 1, a separate intermediate format is created and assigned a session identifier. (Clients C and D in the illustration have requested different reports.) For each client, for any requests that follow (within the specified report session duration) with the same client / session identifier combination, the intermediate format is cached within the temporary database.


Illustration 1: Report Session Caching: Individual Client Intermediate Formats

To summarize the operation of Report Session caching, when a client makes a report request, the retrieved data and report layout are merged into intermediate format, and stored in the session cache. The intermediate format within the cache can be rendered multiple times, in multiple formats, within the duration of the report session. The report session is, itself, configurable (we will discuss the settings involved in the next section), but we cannot completely disable Report Session caching.

Settings to Configure Report Session Caching

While we cannot completely disable Report Session caching, we do have options to adjust settings to adapt its operation to more closely meet our needs. We can directly control two primary aspects of Report Session caching: 1) we can specify how a client requesting a report is associated with a report session, and 2) we can set the expiration interval of the report session (and thus the duration of the session).

Let’s take a look at how we can adjust these settings within our own environments. To do this, we will work from within the Microsoft SQL Server Management Studio.

1.  Start Microsoft SQL Server Management Studio.

2.  Select Database Engine in the Server type selector of the Connect to Server dialog that appears.

3.  Type / select the server name (server name / instance, if appropriate) in the Server name selector.

4.  Supply authentication information, as required in your own environment.

The Connect to Server dialog appears similar to that depicted in Illustration 2.


Illustration 2: Connecting to the Server ...

5.  Click the Connect button to connect with the specified server.

The Microsoft SQL Server Management Studio opens.

6.  In the Object Explorer pane (it appears by default on the left side of the Studio), expand the Databases folder (click the “+” sign to its immediate left), appearing underneath the server within which we are working.

7.  Expand the ReportServer database (click the “+” sign to the immediate left of its icon).

8.  Expand the Tables folder to expose the database tables.

9.  Right-click the ConfigurationInfo table.

10.  Select Open Table from the context menu that appears, as shown in Illustration 3.


Illustration 3: Opening the ConfigurationInfo Table

The ConfigurationInfo table opens. Here we can make modifications to adjust the operation of Report Session caching. There are two controllable options for this type of caching. First, we can adjust the UseSessionCookies setting, which allows us to dictate how a requesting information consumer client is associated with a report session. Default setting for this property is “true,” although we have the option for setting this to “false,” and disallowing the use of session cookies. The “false” alternative will direct the Report Server to embed the session identification information into the URL address for the report involved.

The other configuration option that is available to us with Report Session caching lies in our ability to set the duration of the report session by adjusting the expiration interval. We manage expiration interval via the SessionTimeout setting. Default for the setting is ten (10) minutes (or 600 seconds).

The default UseSessionCookies and SessionTimeout settings appear as depicted in Illustration 4.


Illustration 4: ConfigurationInfo Table – Report Server Caching Settings

When making changes to the UseSessionCookies and SessionTimeout settings, we will, of course, want to consider such things as their impact upon overall security and any risks involved in presenting stale data, respectively. And while there are a couple of ways, from a technical perspective, of “refreshing” the data at any time by clearing the current report session, consumers can also accomplish this by using the Refresh Report button within the report toolbar, as appropriate.

Conclusion

In this article, we introduced a three-part subseries surrounding caching options in Reporting Services 2005. We began by overviewing the three types of caching that Reporting Services 2005 offers: Report Session, Report Execution, and Snapshot. We then introduced the first of these three, and launched our overview of Report Session caching.

As a part of our examination of Report Session caching, we discussed the general purpose of this first caching type. We next reviewed details about how Report Session caching is accomplished in Reporting Services 2005. Finally we explored the settings involved in putting Report Session caching to work, including system defaults for those settings. Throughout the various sections of the article, we discussed other information about Report Session caching in an attempt to assist in selecting or discarding this option for use within our own business environments.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Reporting Services Forum.

MSSQL Server Reporting Services
Part 71: Introducing the Tablix Data Region: Basic Grouping Concepts
Part 70: Introducing the Tablix Data Region in Reporting Services 2008
Part 69: 100% Stacked Column Chart for Analysis Services Data
Part 68: XY (Scatter) Chart for Analysis Services Data
Part 67: Simple Doughnut Chart for Analysis Services Data
Part 66: Exploded Pie Chart for Analysis Services Data
Part 65: Stacked Bar Chart for Analysis Services Data
Part 64: Line Chart for Analysis Services Data
Part 63: Stacked Column Chart for Analysis Services Data
Part 62: A More Advanced Pie Chart for Analysis Services Data
Part 61: Simple Pie Chart for Analysis Services Data
Part 60: Simple Bar Chart for Analysis Services Data
Part 59: Simple Column Chart for Analysis Services Data
Part 58: Introducing Reporting Services Charts for Analysis Services
Part 57: Mastering OLAP Reports: Parameterized Grouping
Part 56: Mastering OLAP Reports: Parameterizing Number of “Top” Items with the MDX TopCount() Function, Part II
Part 55: Mastering OLAP Reports: Parameterizing Number of “Top” Items with the MDX TopCount() Function, Part I
Part 54: Mastering OLAP Reports: Parameterizing Number of “Look Back” Periods with the MDX LastPeriods() Function, Part II
Part 53: Mastering OLAP Reports: Parameterizing Number of “Look Back” Periods with the MDX LastPeriods() Function, Part I
Part 52: Support Parameterization from Analysis Services – Parameter Defaults
Part 51: Parameterization from Analysis Services – Cascading Picklists
Part 50: Support Parameterization from Analysis Services
Part 49: Parameter Support Objects, Pt II: Support OLAP Parameter Defaults with Datasets
Part 48: Reporting Services: Customize Automatically Created Parameter Support Objects
Part 47: Snapshot Reports II: SQL Server Management Studio Perspective
Part 46: Snapshot Reports I: Report Manager Perspective
Part 45: Report Execution Caching II: Report Manager Perspective
Part 44: Black Belt Administration: Report Execution Caching I: SQL Server Management Studio Perspective
Part 43: Black Belt Administration: Caching Options: Report Session Caching
Part 42: Black Belt Administration: Reporting Services Configuration Manager
Part 41: Intelligent Layering: Leverage Conditional Formatting Logic from Analysis Services
Part 40: Black Belt Administration: Performance Dashboard for Microsoft SQL Server, Part II
Part 39: Black Belt Administration: Performance Dashboard for Microsoft SQL Server, Part I
Part 38: Mastering OLAP Reports: Extend Reporting Services with Custom Code
Part 37: Mastering OLAP Reports: Parameters for Analysis Services Reporting, Pt. II
Part 36: Black Belt Components: Support Simple Navigation with a Document Map
Part 35: Mastering OLAP Reports: Parameters for Analysis Services Reporting, Pt. I
Part 34: Black Belt Components: Interactive Sorts within a Matrix Data Region
Part 33: BlackBelt Authoring: Conditional Drillthrough to Multiple Reports
Part 32: Mastering OLAP Reporting: Prototype KPIs in Reporting Services
Part 31: BlackBelt Administration: Linked Reports in SQL Server Management Studio
Part 30: BlackBelt Administration: Linked Reports in Report Manager
Part 29: Mastering OLAP Reporting: Reporting with Analysis Services KPIs
Part 28: Report Builder: Creating a Report Model
Part 27: Mastering OLAP Reporting: Meet Business Needs with Matrix Dynamics, Part II
Part 26: Mastering OLAP Reporting: Meet Business Needs with Matrix Dynamics, Part 1
Part 25: Mastering OLAP Reporting: Display a Dataset Field in a Report Page Header
Part 24: Interactive Sorting Within Reporting Services
Part 23: Mastering OLAP Reporting: Multiple Value Selection in a Parameter Picklist
Part 22: Mastering OLAP Reporting: Drilling Through Using MDX
Part 21: Mastering OLAP Reporting: Relationally-Based Picklists for OLAP Reporting
Part 20: Mastering OLAP Reporting: Extending Conditional Formatting: SWITCH and Drilldown Defaults
Part 19: Mastering OLAP Reporting: Percent of Total - Chart Presentation Nuances
Part 18: Mastering OLAP Reporting: Percent of Total - Two Perspectives
Part 17: Mastering OLAP Reporting: Ad Hoc TopCount and BottomCount Parameters
Part 16: Black Belt Components: Ad Hoc Sorting with Parameters
Part 15: Black Belt Administration: "Governor" Capabilities: Report Execution Timeout
Part 14: Black Belt Administration: Execution Log Performance and Audit Reports
Part 13: Black Belt Administration: Prepare the Execution Log for Reporting
Part 12: Black Belt Components: Ad Hoc Conditional Formatting for OLAP Reports
Part 11: Black Belt Components: Manage Nulls in OLAP Reports
Part 10: Reporting Services Basics: Create a Reusable Template Report
Part 9: Master Chart Reports: Track Exchange Rates in a Line Chart
Part 8: Master Chart Reports: Pie Charts in Reporting Services
Part 7: Mastering OLAP Reporting: Cascading Prompts
Part 6: Managing Reporting Services: Data-driven Subscriptions, and External Data Sources for Subscriber Data
Part 5: Managing Reporting Services: Report Execution and Standard Subscriptions
Part 4: Managing Reporting Services: Data Connections and Uploads
Part 3: The Authoring Phase: Overview Part II
Part 2: The Authoring Phase: Overview Part I
Part 1: A New Paradigm for Enterprise Reporting


Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives








Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SSRS, Sharepoint or ASP.NET kappa02 1 August 31st, 08:59 AM
Ad/ldap & sql 2005 (7321) kappa02 4 August 30th, 03:58 PM
Sql SerVer Restore SaranSaki 3 August 27th, 02:15 PM
DTS Excel data exceeds 65536 rows ssingh 1 August 13th, 09:55 AM