SSIS包在sql server agent中失败,但在visual studio中失败。 ODBC连接

时间:2014-11-06 21:51:57

标签: sql-server visual-studio-2010 ssis sql-agent-job

我有一个在Visual Studio 2010中运行良好的SSIS包,但作为一项工作,它在连接到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.

提前致谢。

1 个答案:

答案 0 :(得分:1)

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

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