本文介绍了从存储过程执行 SQL Server SSIS 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个存储在 SQL Server 2005 DB 中的 SSIS 包.我正在尝试从同一台服务器上的存储过程执行此包.有没有比 exec master..xp_cmdshell 'dtexec/SQL...

I have a SSIS package that is stored in a SQL Server 2005 DB. I am trying to execute this package from a stored procedure on the same server. Is there a better way than exec master..xp_cmdshell 'dtexec /SQL...

我遇到(我认为)阻止执行的 xp_cmdshell 文件系统权限问题

I am running into (I think) file system permission issues with xp_cmdshell that is preventing execution

推荐答案

我建议改用 Agent:

I recommend using Agent instead:

  1. 为将运行作业的帐户创建代理代理帐户
  2. 创建运行此包的代理作业
  3. 使其使用在 #1 中创建的代理帐户
  4. 测试作业
  5. 在 SQL 代码中,使用 sp_start_job 启动此作业
  1. Create Agent proxy account for the account that will run the job
  2. Create Agent job that runs this package
  3. Make it use the proxy account created in #1
  4. Test the job
  5. In SQL code, use sp_start_job to start this job

缺点是您不能通过这种方式轻松地将参数从 SQL 传递到包.

The downside is that you can't easily pass the parameters from SQL to the package this way.

这篇关于从存储过程执行 SQL Server SSIS 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-02 16:19