将SSIS包作为SQLAgent作业执行 [英] Executing SSIS Package as SQLAgent Job

查看:246
本文介绍了将SSIS包作为SQLAgent作业执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SQL Server 2008 SSIS作业,该作业执行一些Win 32 exe文件.当我通过BIDS执行作业时,此作业运行良好(在Windows 2008框中).现在,我已将该程序包部署在MSDB数据库中,并尝试以SQLAgent Job的身份执行该程序包.

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 Integration Services程序包类型的2005 SQL Agent任务没有运行32位模式的选项,默认情况下,所有内容都以64位模式运行.为了解决这个问题,需要运行一个操作系统命令并调出32位dtexec.exe,这很可能是在C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.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 Server\100\DTS\Binn\DTExec.exe

这篇关于将SSIS包作为SQLAgent作业执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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