Clear SSRS Report Cache

Clear SSRS Report Cache

We’re using SSRS caching for a number of reports in our organization; typically those with relatively fixed date ranges and brands. Many of our reports are for “yesterday” or WTD (week to date) so caching has been implemented to speed up report run times for up to 100 stakeholders.

Every so often though a report cache needs to be cleared so that the freshness of the data can be updated. Perhaps ETL had an issue overnight but someone in Finance ran some ad hoc reporting before you could complete. If you need to refresh the cache for a particular report, this works well for us:

--// Clear a report Cache 
USE ReportServer1; 
GO 

--// First find the report path needed 
SELECT [Name], [Path] 
FROM [dbo].[Catalog] 
WHERE [Name] LIKE '%Daily Report%' 

--// Now paste the report path into the below and execute 
EXEC FlushReportFromCache '/Finance/Daily Report' 
EXEC CleanExpiredCache
Mike250

Australian. Sport. Passionate Cricket Fan. Go Pro. Abseiling. Snorkeling. Travel. Golf R. SQL Server Developer. Three sons. One daughter. Last Trip: New York.

Related Posts
Leave a comment

Your email address will not be published. Required fields are marked *