Skip to content

Instantly share code, notes, and snippets.

@ronmichael
Created January 21, 2013 00:16
Show Gist options
  • Save ronmichael/4582756 to your computer and use it in GitHub Desktop.
Save ronmichael/4582756 to your computer and use it in GitHub Desktop.
Analyze SQL Server Reporting Services (SSRS) report usage. Note that the log tables do get cleared automatically after 30-60 days or so, so you need to run this regularly.
SELECT
ex.UserName, ex.Format,
cat.Path,
cat.Name, ex.Parameters,
CONVERT(nvarchar(10), ex.TimeStart, 101) AS rundate,
ex.TimeStart, ex.TimeEnd, ex.TimeDataRetrieval, ex.TimeProcessing, ex.TimeRendering, ex.Status,
ex.ByteCount, ex.[RowCount]
FROM ReportServer..ExecutionLog AS ex INNER JOIN
ReportServer..Catalog AS cat ON ex.ReportID = cat.ItemID
ORDER BY ex.TimeStart DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment