使用 dtexec 实用程序执行 SSIS 包 [英] SSIS Package Execution using dtexec utility
问题描述
我制作了一个 SSIS 包来创建一个 XML 文件,它在 Visual Studio 中运行良好,但是当我尝试使用 dtexec/f "C:\OakeyCreek.dtsx"
它抛出一个错误
I have made a SSIS package to create an XML file, which works fine in Visual Studio, but when I try to run in cmd prompt using dtexec /f "C:\OakeyCreek.dtsx"
it throws an error
SSIS 包TestOakey"退出代码失败:1
SSIS Package "TestOakey" failed with exit code: 1
在包中,sqltask 以 XML 形式提供结果集,脚本任务创建 xml 文件.
In the package a sqltask gives resultset as XML and a script task creates the xml file.
我做了一些研究,没有脚本任务的同一个包在工作室和 cmd 提示符下都运行良好.我怀疑脚本任务有问题,因为我在同一台机器上同时安装了 VS2005 和 VS2008.
I did some research, same package without script task run fine both studio and cmd prompt. I am suspecting problem with script task, because I have both VS2005 and VS2008 on the same machine.
知道如何解决这个问题吗?
Any idea how to resolve this problem ?
确切的错误毫秒弹出是...
Exact error ms popup is ...
需要更新此应用程序的注册信息.要更新,请以管理员身份登录并运行此命令.
Registration information for this application needs to be updated.To update, log on as an administrator and run this command.
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTA.exe"/HostID SSIS_ScriptTask/setup
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTA.exe" /HostID SSIS_ScriptTask /setup
我的操作系统是 Vista
My operating system is Vista
推荐答案
注意:已编辑以提供答案!
Note: Edited to provide the answer!
所以您已经设置了一个 SQL Server 代理作业,现在您无法写入文件系统.这是预期的行为,因为 SQL Server 代理使用SQL Server 凭据来启动作业,不是 Windows 凭据.所以,你必须做的是:
So you've set up a SQL Server Agent job, and now you can't write to the file system. This is expected behavior, since SQL Server Agent uses SQL Server credentials to launch the job, not Windows credentials. So, what you'll have to do is this:
- 在 SQL Server Management Studio 中数据库服务器的 Security 文件夹下,找到 Credentials 文件夹.
- 右键单击凭据"并点击新建凭据".
- 按照您的意愿设置凭据.
- 展开 SQL Server 代理,右键单击代理,然后点击新建代理.
- 使用您刚刚创建的凭据设置代理.
- 启用代理以拥有 SSIS 子系统(如果是管理员,请检查所有子系统).
- 编辑作业中调用 SSIS 包的步骤.
- 将运行方式"字段从 SQL Server 代理更改为您刚刚设置的代理(如果操作正确,它将是下拉列表中唯一的其他选择).
- 你应该没事了!
干杯,
埃里克
这篇关于使用 dtexec 实用程序执行 SSIS 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!