LiCongMingDeShujuku / Get-A-List-Of-All-Schedule-ID-s-For-

获取代理作业的所有计划ID列表

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLEVER DATA GIT REPO

获取代理作业的所有计划ID列表 Agent JOBS

Get A List Of All Schedule ID’s For SQL Agent Jobs

发布-日期: 2015年09月14日 (评论)

Contents

中文

这里有一些可以显示所有作业中的所有计划ID的快速SQL逻辑。如果你在整个过程中有多个具有相同目的的代理作业,并且你需要修改所有这些作业的计划,这会很有用。获取计划ID将允许你批量更新计划。

English

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.


Logic

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

WorksEveryTime

Build-Info

Build Quality Build History
Build-Status
Coverage
Nuget
Build history

Author

  • 李聪明的数据库 Lee's Clever Data
  • Mike的数据库宝典 Mikes Database Collection
  • 李聪明的数据库 "Lee Songming"

Gist Twitter Wordpress


License

LicenseCCSA

Lee Songming

About

获取代理作业的所有计划ID列表