SQL
How to find the SSRS Job Name with the Report Name SQL
How to find the SSRS Job Name with the Report Name SQL
In order to check the status of the SSRS report subscription jobs, status, and the last run time, run the following SQL script against the MASTER DB. ย It will list:
- report id
- report name
- last status
SELECT
cย .Nameย ASย ReportName
,ย rsย .ย ScheduleIDย ASย JOB_NAME
,ย sย .ย [Description]
,ย sย .ย LastStatus
,ย sย .ย LastRunTime
FROM
ReportServerย ..[Catalog]ย c
JOINย ReportServerย ..ย Subscriptionsย sย ONย c.ย ItemIDย =ย s.ย Report_OID
JOINย ReportServerย ..ย ReportScheduleย rsย ONย c.ย ItemIDย =ย rs.ย ReportID
ANDย rsย .ย SubscriptionIDย =ย sย .ย SubscriptionID
|
This will give you output in the SQL Management Studio in Grid view of your report name and then also allow you to match this up with the very non-intuitive JOB_NAME. ย Once you have this information, you can then check your Job logs for the jobs in which you would like to see the history and more details about previous job runs.
To do this simply:
- Look under SQL Server Agent in Management Studio
- Jobs
- Right-click the job and choose to view history