Take the first block of code and search by your report name. Take the SQLAgent Job Name and apply it to the msdb.dbo.sp_start_job to fire off your SSRS Subscription.
USE ReportServer
GO
/Execute SSRS Subscription Manually/
/Connect to Database ReportServer/
SELECT
sub.LastStatus
,s.ScheduleID AS SQLAgent_Job_Name
,SUB.Description AS Sub_Desc
,SUB.DeliveryExtension AS Sub_Del_Extension
,C.Name AS ReportName
,C.Path AS ReportPath
FROM ReportServer.dbo.ReportSchedule RS
INNER JOIN Schedule S ON (RS.ScheduleID = S.ScheduleID)
INNER JOIN Subscriptions SUB ON (RS.SubscriptionID = SUB.SubscriptionID)
INNER JOIN [Catalog] C ON (RS.ReportID = C.ItemID AND SUB.Report_OID = C.ItemID)
WHERE C.Name LIKE ‘%AFTEROWL%’ — Enter Report Name to find Job_Name
/Connect to Database MSDB on the Reporting Server/
/Enter SQLAgent_Job_Name to execute the subscription based on Job ID/
EXEC msdb.dbo.sp_start_job @job_name = ‘7229B588-626C-43B9-8B18-028582673464’
You must be logged in to post a comment.