2015-05-04 79 views
2

我在Visual Studio中以調試模式運行SSIS包時連接到Oracle數據庫時出現問題。我正在使用安裝了Data Tools的Visual Studio 2012和Oracle 10g客戶端。在Visual Studio調試過程中無法連接到Oracle數據庫

我正在使用10g客戶端附帶的Oracle Provider for OLE DB。我可以創建到服務器的連接管理器連接並測試連接性。我還可以在OLE DB Source編輯器中預覽我的查詢中的數據。它只在調試過程中失敗。

實際的錯誤信息是:

Error: 0xC0202009 at TW_Billing, Connection manager "server.schema": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. 
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-12154: TNS:could not resolve the connect identifier specified". 
Error: 0xC020801C at Data Flow Task, ERDB Billing45 Source [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "server.schema" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. 
Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: ERDB Billing45 Source failed validation and returned error code 0xC020801C. 
Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation. 
Error: 0xC0024107 at Data Flow Task: There were errors during task validation. 

大部分我已經在這個問題上做點到32位誤差的研究。我嘗試將ForcedExecutionMode設置爲Int32並將ForceExecutionMode設置爲True。我還將項目屬性更改爲Run64bitRuntime爲False。這些都沒有改變。

如果它有所作爲,我們使用LDAP進行Oracle連接。也就是說,我通常沒有連接到TNS Names服務器的問題(I.E.我可以通過除Visual Studio調試模式以外的任何方式連接到Oracle服務器)。

+0

爲什麼不使用[Oracle Managed Client](https://www.nuget.org/packages/Oracle.ManagedDataAccess/)? – mason

+0

在調試時切換到「x86」嗎?即它是爲64位工作? –

+0

我做到了。請參閱下面的答案。我錯過了Visual Studio的Oracle開發工具。 – TDavis

回答

相關問題