Query to find the SSIS package run schedule
I have created a SQL Server 08 database maintenance plan using the Wizard.
The job shows in the msdb.sysjobs table but it doesn't show the schedule in the msdb.sysjobschedules table because the Wizard created it as an SSIS package. - fine
Then I go to the msdb.sysssispackages and I can see the package there but nothing about the next scheduled ru开发者_如何学Cn date.
My question is if it is possible to create a query to get the job schedule for that type of job. Something as simple as next_run_date like in the sysjobschedules table.
Thank you.
This works for me.
SELECT *
FROM msdb.dbo.sysmaintplan_plans p
INNER JOIN msdb.dbo.sysmaintplan_subplans sp
ON p.id = sp.plan_id
LEFT OUTER JOIN msdb.dbo.sysjobschedules j
ON j.schedule_id = sp.schedule_id
精彩评论