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

I'm an Australian Chief Analytics Officer passionate about data science, visual insights, and all things sportโ€”particularly cricket. An adventurer at heart, Iโ€™ve gone from abseiling cliffs to snorkeling in crystal-clear waters, sleeping in the wilds of Africa, and exploring destinations worldwide, with my latest trip taking me to Bali. When I'm not diving into data or analytics, I'm spending time with my three sons and two daughters, attempting to hit sixes for my local cricket club, reviewing chicken schnitzels or honing my craft around a coffee machine.

Related Posts
Leave a comment

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