I'm using SSRS 2016. I want to find out the last time a particular report was run. Is this something I can easily query on the ReportServer database? Thanks!
You can get this from the executionlog tables/views in the ReportServer database. By default this will have (I think) 60 days of logs. You can change this value in the ReportServer properties. I have 400 days retention so I can report on report usage.
Anyway, you can use something like this...
USE ReportServer
GO
select TOP 1
c.*
, el.*
from ExecutionLog el
join Catalog c on el.ReportID = c.ItemID
WHERE
c.[Path] = '/MyReportFolder/MyReportSubFolder'
and c.[Name] = 'MyReportName'
ORDER BY TimeStart DESC
The path =...
is optional if all your report names are unique and the top 1
is there because you asked to only find the last time the report was run but you can obviously remove these limitations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With