Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须在数据库服务器中的所有 SQL 作业上制作一个包含触发时间的文档,有没有办法从msdb获取所有触发时间,而无需前往 SQL 服务器代理下的每个作业并检查属性。
谢谢
我认为你需要这个:
select j.job_id, j.name, s1.next_run_date, s1.next_run_time, s2.* from msdb.dbo.sysjobs j left outer join msdb.dbo.sysjobschedules s1 on j.job_id=s1.job_id left outer join msdb.dbo.sysschedules s2 on s1.schedule_id=s2.schedule_id