【发布时间】:2015-04-25 16:41:38
【问题描述】:
我有一个使用 VS 在服务器上开发的 SSIS 包。 该包在 Visual Studio 中运行良好,但是当我添加到 SQL Server 代理中的作业时,包失败。 我从 SAGE Line 50 v19 中提取数据,因此 ODBC 驱动程序是 32 位的。而且我在 64 位环境中运行。 已经将 odbc 设置为 32 位,确保代理设置为运行 32 位,但仍然遇到错误。我已经测试了从命令行运行包如下
"C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /FILE "E:\Reporting\Projects\SSIS\SSIS2012\SSIS2012\Package1.dtsx" /DECRYPT password /CHECKPOINTING OFF /REPORTING EWCDI
当我运行它时它工作得很好。但是,当我将 sql 代理作业设置为作为“操作系统 (CmdExec)”运行时,我得到以下输出。
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.2100.60 for 32-bit
Copyright (C) Microsoft Corporation. All rights reserved.
Started: 13:30:44
Info: 2015-02-24 13:30:44.45
Code: 0x40016044
Source: Data Flow Task Data Flow Task (SSIS.Pipeline)
Description: Attempting to upgrade "ODBC Source". The package is attempting to upgrade an extensible object.
End Info
Error: 2015-02-24 13:30:44.59
Code: 0xC0014020
Source: SSIS002_SageCompany5Import Connection manager "Sage005.Manager"
Description: An ODBC error -1 has occurred.
End Error
Error: 2015-02-24 13:30:44.59
Code: 0xC0014009
Source: SSIS002_SageCompany5Import Connection manager "Sage005.Manager"
Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
End Error
Error: 2015-02-24 13:30:44.59
Code: 0xC00291EC
Source: Get Max(SourceID) Execute SQL Task
Description: Failed to acquire connection "Sage005.Manager". Connection may not be configured correctly or you may not have the right permissions on this connection.
End Error
Warning: 2015-02-24 13:30:44.59
Code: 0x80019002
Source: SSIS002_SageCompany5Import
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
我不明白为什么这在其他地方运行良好。谷歌搜索了几个小时,尝试了我能想到的一切,但没有运气。
【问题讨论】:
-
将包文件放在与 DTExec.exe 不同的驱动器上是否会导致问题?
-
第一个问题的出色工作。你已经通过并击中高音来确定你在做什么,问题是什么以及你尝试了什么。谢谢你
-
您添加所有者了吗?喜欢在屏幕上[链接]pl.tinypic.com/view.php?pic=2hdcopg&s=8#.VOyWqS6gTEs
-
我看到输出中看起来很奇怪的是
Attempting to upgrade "ODBC Source"和There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server当包在 SQL 代理下运行时,它是作为代理运行还是涉及存储凭据和代理?如果是前者,Sage 服务器的身份验证如何设置?它是用户名和密码还是查看当前用户?如果凭据,这些存储在哪里?文本文件?如果是这样,可能是在代理帐户没有权限的文件系统上 -
@bp3849 您是否尝试过其他驱动程序(OLE DB 等)?