2014-11-06 82 views
1

我有一个在Visual Studio 2010中运行良好的SSIS包,但作为一个工作,它连接到ODBC数据库时,sql server失败。SSIS包在SQL Server代理中失败,但在Visual Studio中失败。 ODBC连接

该项目使用密码加密敏感数据。这是因为代理服务器不是我的帐户。它也恰好是用连接字符串连接到ODBC的用户。作业在ODBC连接失败之前成功连接到几个非ODBC数据库。

该项目设置为以32位模式运行,但奇怪的是,当我将它设置为64位时,它将在ODBC连接时失败。

所有服务器都设置为与当前用户一起运行,但ODBC数据库(具有连接字符串)除外。这可能与它有关吗?

这里的错误信息提前

Description: An ODBC error -1 has occurred. End Error Error: 2014-11-07 09:05:14.18  Code: 0xC0014009  
Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server. End Error 
Description: The AcquireConnection method call to the connection manager MyODBC failed with error code 0xC0014009. 
There may be error messages posted before this with more information on why the AcquireConnection method call failed. 
End Error Error: 2014-11-07 09:05:14.18  Code: 0xC0047017  Source: MyDFT SSIS.Pipeline  
Description: ODBC Source failed validation and returned error code 0x80004005. End Error 
Error: 2014-11-07 09:05:14.18  Code: 0xC004700C  Source: MyDFT SSIS.Pipeline  
Description: One or more component failed validation. End Error 
Error: 2014-11-07 09:05:14.19  Code: 0xC0024107  Source: MyDFT  
Description: There were errors during task validation. End Error 
DTExec: The package execution returned DTSER_FAILURE (1). Started: 9:05:00 AM Finished: 9:05:14 AM Elapsed: 14.071 seconds. 
The package execution failed. The step failed. 

感谢。

+0

请发布错误消息,如果可能的话,包装设计界面的图像。 – 2014-11-06 23:18:10

+0

连接到您正在运行它的机器。从命令行运行它。它在那里工作吗?这是SSIS 2012,如果是的话,你使用的是项目部署模型吗? – billinkc 2014-11-07 02:26:57

+0

添加了错误消息。在命令行中使用SQL Server代理步骤中的所有参数运行它会给我带来同样的错误。该项目在2010年,我不幸无法访问2012年。在64位Visual Studio中运行包给我同样的错误。代理可以以64位运行它,还是与它无关? – Jooooosh 2014-11-07 14:11:55

回答

1

我能够通过创建一个64位系统DSN与32位相同的名称来解决此问题。

任务管理器的平台列显示我的Visual Studio(devenv.exe)是32位,并且我的SQL Server代理服务(SQLAGENT.EXE)是64位。这解释了它。