Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear the cache for hundreds of reports

Status
Not open for further replies.

SQLWilts

Programmer
Feb 12, 2001
651
GB
I have inherited an arena where hundreds of reports have been created with their own report-specific chacheing. (No shared schedule)

For various reasons, I want to be able to clear out the cache for ALL the reports without having to visit each report individually.

any ideas as to how I could achieve this? Oh, and re-publishing the reports is a no-go also.

Thanks
 
Sussed it:

If I run this, I get the execution cache for all reports:

Code:
SELECT	C.[Name]
		,C.Path
		,EC.SnapshotDataID
FROM	[ReportServer].dbo.Catalog C 
			JOIN [ReportServerTempDB].dbo.ExecutionCache EC ON EC.ReportID = C.ItemID

I then simply do this:
Code:
DELETE	[ReportServerTempDB].dbo.SnapshotData
WHERE	SnapshotDataID = '53E0CB9E-8E1C-4E3E-93A7-A0BC1790F9F9' --from the above query

DELETE	[ReportServerTempDB].dbo.ExecutionCache
WHERE	SnapshotDataID = '53E0CB9E-8E1C-4E3E-93A7-A0BC1790F9F9' --from the above query

I will now glue these together into an admin interface
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top