在Visual Studio调试期间无法连接到Oracle数据库

时间:2015-05-04 16:30:24

标签: oracle visual-studio

在Visual Studio中以调试模式运行SSIS包时,我遇到连接Oracle数据库的问题。我正在使用安装了数据工具的Visual Studio 2012和Oracle 10g客户端。

我正在使用10g客户端附带的OLE DB 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服务器)。

1 个答案:

答案 0 :(得分:0)

所以我显然无法为Visual Studio安装Oracle Developer Tools:

http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index-097110.html

在新的Oracle Home位置安装它并重新启动Visual Studio解决了我的问题。包现在正确调试期间运行。