Monday, September 17th, 2007

File Under: Reporting Services Tricks

Wondering which SQL Job runs which subscription? Here’s how to find out.

select a.name, d.name, d.path, c.description, c.laststatus, c.lastruntime
from msdb.dbo.sysjobs a
join reportserver..reportschedule b on a.name=cast(b.scheduleid as nvarchar(255))
join reportserver..subscriptions c on b.subscriptionid=c.subscriptionid
join reportserver..catalog d on c.report_oid=d.itemid
order by c.lastruntime desc

No Comments » - Posted in SQL Server by Shane