Failed scheduled reports in SSRS (Query)

How to find failed SSRS report subscriptions? Which includes the SQL Agent Job Id?
Well, you might want to use this query!

c.Name AS Report_Name
,C.Path AS ReportPath
,s.ScheduleID AS JobName
,su.Description AS SubscriptionDescription
FROM dbo.Schedule s
INNER JOIN dbo.ReportSchedule rs
ON s.ScheduleID = rs.ScheduleID
INNER JOIN dbo.Catalog c
ON rs.ReportID = c.ItemID
INNER JOIN dbo.Subscriptions su
ON rs.SubscriptionID = su.SubscriptionID
WHERE LastStatus LIKE '%Failure%'

Thanks to Thomas Mucha.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s