从另一个 SSIS 包执行一个 SSIS 包,但使用不同的代理用户。是否可以?
我有一个 SSIS 包必须作为代理 A 运行,另一个必须作为代理 B 运行。我希望运行第一个包,并作为其任务之一执行第二个包。这可能吗?
多谢!
I have one SSIS Package that must run as Proxy A
and another that must run as Proxy B
. I would love to have the first package run, and, as one of its tasks, execute the second package. Is this possible?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以让第一个包使用 sp_start_job 来启动一个作业,该作业是设置运行第二个包。如果这是“一劳永逸”,那么这就是您需要做的。如果您需要等到它完成,事情会变得更加混乱 - 您必须循环调用(并解析其输出) sp_help_jobactivity
并使用
WAITFOR DELAY
直到运行完成。如果您需要确定运行第二个包的实际结果,这也会更加复杂。
You could have the first package use sp_start_job to kick off a job that is set up to run the second package. If this is "fire-and-forget", that's all you need to do. If you need to wait until it's completed, things get more messy - you'd have to loop around calling (and parsing the output of) sp_help_jobactivity
and use
WAITFOR DELAY
until the run completes.This is also more complex if you need to determine the actual outcome of running the second package.