Archive

Archive for March, 2013

T-SQL : List of scheduled reports in SSRS

The following query will list all the available report subscriptions in SSRS. The reportserver database basically holds all metadata information [reports, users, schedules, roles etc] of all reports and thereby, querying the same will provide us a lot of useful results, one such example is shown below

SELECT cat.Name        AS ReportName,
       cat.Path        AS ReportPath,
       sub.Description AS Destination,
       usr.UserName    AS ModifiedBy,
       sub.LastStatus  LatestStatus
FROM   ReportServer..Catalog cat
       JOIN ReportServer..reportSchedule repsch
         ON cat.ItemID = repsch.ReportID
       JOIN ReportServer..Subscriptions sub
         ON repsch.SubscriptionID = sub.SubscriptionID
       JOIN ReportServer..Users usr
         ON usr.UserID = cat.ModifiedByID
WHERE  cat.Type = 2
ORDER  BY reportname 

Happy Querying 😉

%d bloggers like this: