发布-日期: 2015年09月14日 (评论)
这里有一些可以显示所有作业中的所有计划ID的快速SQL逻辑。如果你在整个过程中有多个具有相同目的的代理作业,并且你需要修改所有这些作业的计划,这会很有用。获取计划ID将允许你批量更新计划。
Here’s some quick SQL Logic to show you all the schedule ID’s across all your Jobs. This will help if you have multiple across the enterprise that have the same purpose, and you need to modify the schedule across them all. Getting the Schedule ID will allow you to do a mass update of the schedules.
use master;
set nocount on
select
sj.name
, sjs.step_id
, sjs.step_name
, sjsched.schedule_id
from
msdb..sysjobs sj join msdb..sysjobsteps sjs on sj.job_id = sjs.job_id join msdb..sysjobschedules sjsched on sj.job_id = sjsched.job_id order by
sj.name
, sjs.step_id asc
Build Quality | Build History | ||||
---|---|---|---|---|---|
- 李聪明的数据库 Lee's Clever Data
- Mike的数据库宝典 Mikes Database Collection
- 李聪明的数据库 "Lee Songming"