SELECT
j.job_id JOB_ID
, TRY_CONVERT(uniqueidentifier, j.[name]) JOB_NAME
, c.[name] REPORT_NAME
, s.Description
FROM ReportServer.dbo.ReportSchedule rs
JOIN msdb.dbo.sysjobs j ON rs.ScheduleID = TRY_CONVERT(uniqueidentifier, j.[name])
JOIN ReportServer.dbo.Subscriptions s ON s.[SubscriptionID] = rs.[SubscriptionID]
JOIN ReportServer.dbo.Catalog c ON c.itemid = s.[Report_OID]
ORDER BY 3
The JOB_NAME is the SQL Agent job name
No comments:
Post a Comment