问题描述
我有一个 SQL Server 2008 SSIS 作业,它执行一些 Win 32 exe 文件.当我通过 BIDS(在 Windows 2008 机器上)执行作业时,该作业运行良好.现在我已经在 MSDB 数据库中部署了该包并尝试将该包作为 SQLAgent 作业执行.
I have a SQL Server 2008 SSIS job which executes some Win 32 exe files. This job runs fine when i execute the job through BIDS (On Windows 2008 box). Now i have deployed the package in MSDB database and trying to execute the package as SQLAgent Job.
当我执行此操作时,作业失败并在执行 Win 32 exe 时抛出错误消息.我可以在同一台服务器上从批处理文件运行 exe.但是当 SQLServer 代理作业尝试执行时,它会抛出以下错误
When i do this the job fails and throws an error message while executing the Win 32 exe. I'm able to run the exe from a batch file on the same server. But when SQLServer agent job tries to execute it throws below error
代码:0xC0029151,进程退出代码为1",而预期为0".结束错误 DTExec:包执行返回 DTSER_FAILURE (1).
Code: 0xC0029151, The process exit code was "1" while the expected was "0". End Error DTExec: The package execution returned DTSER_FAILURE (1).
有什么想法吗?
推荐答案
我假设服务器是 64 位服务器,是吗?如果是这样,代理将在 64 位模式下运行 SSIS,这会导致与可执行文件不兼容.
My assumption is the server is a 64 bit server, yes? If so, the agent will be running SSIS In 64 bit mode and that's causing an incompatibility with the executables.
在代理作业中,在执行选项"选项卡上,选中使用 32 位运行时",应该没问题.
In the agent job, on the Execution Options tab, check the "Use 32 bit runtime" and it should be fine.
问题被标记为 2008 年,但如果我没记错的话,SQL Server 集成服务包类型的 2005 年 SQL 代理任务没有在 32 位模式下运行的选项,默认情况下一切都在 64 位模式下运行.为了解决这个问题,需要运行一个操作系统命令并调用 32 位 dtexec.exe,它很可能位于 C:Program Files (x86)Microsoft SQL Server100DTSBinnDTExec.exe
The question is tagged as 2008 but if I recall correctly, 2005 SQL Agent tasks of type SQL Server Integration Services Package did not have an option for running in 32 bit mode and by default everything ran in 64 bit mode. To get around that, one needed to run an OS command and call out to the 32 bit dtexec.exe which was most likely found in C:Program Files (x86)Microsoft SQL Server100DTSBinnDTExec.exe
这篇关于将 SSIS 包作为 SQLAgent 作业执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!