Decoding SSRS Subscription Agent Jobs
https://garrybargsley.com/2021/11/16/decoding-ssrs-subscription-agent-jobs/
Get the SQL Agent Job Name from this query. Filter on c.Path to locate the report you're looking for.
SELECT sj.name AS [SQL Job Name],
c.Path,
c.name,
s.LastRunTime,
s.description,
s.LastStatus,
u.UserName,
s.SubscriptionID
FROM ReportServer..Subscriptions s
INNER JOIN ReportServer..Users u
ON s.OwnerID = u.UserID
INNER JOIN ReportServer..Catalog c
ON s.Report_OID = c.ItemID
INNER JOIN msdb..sysjobsteps sjs
ON sjs.command LIKE '%' + CAST(s.SubscriptionID AS VARCHAR(4000)) + '%'
INNER JOIN msdb..sysjobs sj
ON sj.job_id = sjs.job_id
WHERE c.Path like '%Thick%'
ORDER BY s.LastRunTime;
Comments
Post a Comment