Skip to content

Instantly share code, notes, and snippets.

@kristinaconley
Created August 6, 2013 21:06
Show Gist options
  • Save kristinaconley/6168638 to your computer and use it in GitHub Desktop.
Save kristinaconley/6168638 to your computer and use it in GitHub Desktop.
UPDATE SN
SET SN.PermanentRefcount = SN.PermanentRefcount - 1
FROM
[ReportServerTempDB].dbo.SnapshotData AS SN
INNER JOIN [ReportServerTempDB].dbo.ExecutionCache AS EC ON SN.SnapshotDataID = EC.SnapshotDataID
INNER JOIN Catalog AS C ON EC.ReportID = C.ItemID
WHERE C.Path LIKE '%%'
DELETE EC
FROM
[ReportServerTempDB].dbo.ExecutionCache AS EC
INNER JOIN Catalog ON EC.ReportID = Catalog.ItemID
WHERE Catalog.Path LIKE '%%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment