Ssrs报表查询用户打开记录

发布时间 2023-11-15 14:49:24作者: 网络来者

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