eric.muller (7/26/2013)
Could you share that query? I'd be curious to see it!Cheers,
EJM
Sure, here it is:
select 'exec sp_start_job @job_name = ''' + cast(j.name as varchar(40)) + ''''
from msdb.dbo.sysjobs j
join msdb.dbo.sysjobsteps js on js.job_id = j.job_id
join [ReportServer].[dbo].[Subscriptions] s on js.command like '%' + cast(s.subscriptionid as varchar(40)) + '%'
where s.LastStatus like 'Failure sending%'AND (s.LastRunTime >= GETDATE() - 3)
or s.LastStatus like 'Failure writing%'AND (s.LastRunTime >= GETDATE() - 3);
If you want to look further back, just change the -3. 🙂