December 27, 2011 at 8:53 am
Hello
i am trying to find out who ran which report.
The Executionlog table in the ReportServer database seems like the place to start.
How ever i am not able to get the name of the report that was used by each user.
any help please ? How do we write a simple query to get the results ?
December 27, 2011 at 9:00 am
How about this:
SELECT
C.[Path] as [Report Location], C.name as [Report Name], EL.UserName as [User Name], COUNT(EL.TimeStart) as [Number of Runs], MIN(TimeStart) as [First Run],
MAX(TimeEnd) as [Last Run]
FROM Catalog as C
LEFT JOIN ReportServer..ExecutionLog as EL ON C.ItemID = EL.ReportID
WHERE C.Content IS NOT NULL
GROUP BY C.[Path], C.name, EL.UserName
ORDER BY C.[Path]
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
December 27, 2011 at 9:22 am
Ok it worked!
By the way, why do we have entrees in the Catalog table where the content field is null
December 27, 2011 at 10:13 am
If you query the Catalog table where the content field is null, the Type field, at least on my server, is always 1.
This indicates that it's a folder.
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply