如何使用脚本向作业添加新步骤 [英] How to add new step to job using script

查看:129
本文介绍了如何使用脚本向作业添加新步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我们有一份工作,我们的数据作为其包的一部分运行。然后,我们经常为各种客户定制工作。我们现在需要添加两个步骤。因此,如果作业有步骤1到20,我们需要使用SQL脚本添加2个新步骤。



我试过在网上看,但也找不到任何东西。请帮忙解决这个问题。



感谢您的帮助,

Hi,

We have a job that our Data run as part of it's package. We then often make customizations to the job for our various customers. We need to now add 2 steps. So if the job has steps 1 through 20, we need to add 2 new steps using SQL Script.

I tried looking on the web, but couldn't find anything either. Please help to solve this issue.

Thanks for your help,

推荐答案

SQL Server代理(运行作业的部分有很多存储过程可以处理作业的不同方面 - 你应该使用它们来保护底层数据格式的潜在变化...

http://msdn.microsoft.com/en-us/library/ms187763.aspx [ ^ ]

其中一个清单是 sp_add_jobstep [ ^ ] ...
SQL Server Agent (the part that runs jobs) has a lot of stored procedures exposed to handle different aspects of jobs - you should use them to be protected of potential changes in the underlying data format...
http://msdn.microsoft.com/en-us/library/ms187763.aspx[^]
One of the list is sp_add_jobstep[^]...


这篇关于如何使用脚本向作业添加新步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆