简体   繁体   中英

Auditing SSRS reports to get the last runtime and status on SQL Server

I have 3 tables in SQL Server storing data for every execution of SSRS report

  • Subscription
  • Catalog
  • Users: default table for employees in the company

I want to get the following information:

  • CreatedBy
  • LastModifiedBy
  • Path of the SSRS report
  • Name of the SSRS report
  • Last runtime
  • Last status

Your request is similar to something I have been working on a long time ago.

SELECT
        U1.UserName AS CreatedBy
       ,U2.UserName AS LastModifiedBy
       ,C.[path] AS [Path]
       ,C.[Name] AS [Name]
       ,S.LastRunTime
       ,S.LastStatus
       ,S.ExtensionSettings
    FROM [Subscriptions] AS S
    INNER JOIN [Catalog] AS C
        ON S.Report_OID = C.ItemID
    INNER JOIN [Users] AS U1 
        ON S.OwnerID = U1.UserID
    INNER JOIN [Users] AS U2 
        ON S.ModifiedByID = U2.UserID
 
    ORDER BY U1.UserName
    , U2.UserName
    , C.[path];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM