USE
ReportServer;
SELECT
COUNT(Name) AS ExecutionCount
, Name AS ReportName
, MAX(TimeStart) AS
ReportLastRun
, UserName AS ReportRunByUser
, AVG(TimeDataRetrieval) AS
TimeDataRetrieval
, AVG(TimeProcessing) AS TimeProcessing
, AVG(TimeRendering) AS TimeRendering
, AVG(ByteCount) AS ByteCount
, AVG([RowCount]) AS [RowCount]
, MAX([Format]) AS [Format]
, MAX([Parameters]) AS [Parameters]
FROM
(SELECT
e.TimeStart
,c.Type
,c.Name
,e.UserName
,e.TimeDataRetrieval
,e.TimeProcessing
,e.TimeRendering
,e.ByteCount
,e.[RowCount]
,e.[Format]
,SUBSTRING(e.[Parameters], 1, 200) [Parameters]
FROM Catalog c
JOIN
ExecutionLog e
ON c.ItemID = e.ReportID
WHERE c.Type = 2) AS RE
WHERE
UserName NOT
LIKE 'DOMAIN\user1%'
AND UserName NOT LIKE 'DOMAIN\user2%'
GROUP BY
Name
,UserName
ORDER BY
ReportLastRun DESC
,ReportName
,UserName
No comments:
Post a Comment