SELECT
-- [InstanceName] ,
CG.Path--報表路徑
,CG.Name--報表名字
--,[ReportID]
,[UserName]--用戶名
-- ,[RequestType]
,[Format]
,[Parameters]
-- ,[TimeStart]--查詢開始時間 精確到了毫秒。
,[TimeEnd]--查詢結束時間
,[TimeDataRetrieval]
,[TimeProcessing]
,[TimeRendering]
,[Source]
,[Status]
,[ByteCount]
,[RowCount]
FROM [ReportServer].[dbo].[ExecutionLog] EL--視圖,主要基於表dbo.ExecutionLogStorage
left join [ReportServer].dbo.Catalog CG
on CG.ItemID=el.ReportID
where username <>'NT AUTHORITY\NETWORK SERVICE'
and username<>'NT Service\ReportServer'
and username<>'NT Service\ReportServer'
and DateDiff(dd,TimeEnd,getdate())<=30
order by TimeEnd desc