19 May 2014

Waking up Reporting Services with scripting

I have recently deployed a new reporting solution using SQL Server 2008 Reporting Services. I wanted to look into a solution to ensure that the first user, after reporting services had spun down its’ application pools, doesn't have to wait for them to be re-initiated. This so that I could avoid complaints about reporting services performance.

I was looking for a simple solution to either stop reporting services clearing down the application pools or to find a way of speeding up the first request. I decided on an approach to speed up the first request made by a user. This was because I didn't want to make application settings changes in case other problems occurred.

After searching for a method into speeding up reporting services application pools start-up I came across a useful PowerShell script. The script, which was for PowerShell V2, made use of the .Net class System.Net.WebRequest to make a request to the report manager.

I made a copy of this script and applied some changes which are available from the following location:https://onedrive.live.com/redir?resid=E6F77D4B3FF8D47C%21375

I decided to change my approach after finding this script. My solution is to automate a request to reporting services, by using the above script, at a time before my first user. As this will force reporting services to spin up its application pools and take the cost of the first request instead of the user.

In between implementing my solution and writing this blog post PowerShell V3 & 4 have been released.
Here is a script for Powershell V3 and above: https://onedrive.live.com/redir?resid=E6F77D4B3FF8D47C%21376