2014-11-06 81 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位。這解釋了它。