OraOleDB.Oracle 提供程序的 myGeneration 问题(?)
我无法使 myGeneration 工具正常工作。
这是我使用的连接字符串:
Provider=OraOLEDB.Oracle.1;Password=pass123;User ID=user1;Data Source=oradb1src;Persist Security Info=True
当我单击“测试连接”时,我得到:
[System.Data.OleDb.OleDbException] - ORA-12154:TNS:无法解析服务名称
[oradb1src 在 tnsnames.ora 中定义良好。 这不是问题。]
但是当我将提供程序更改为 MSDAORA 时,连接工作正常,但在“生成”窗口中我缺少“表”选项卡,我应该能够在该选项卡上从数据库中选择表。 我在某处发红,这对于 MSDAORA 提供程序来说是正常的,因为 my Generation 使用 oledb 提供程序进行元数据检索。
但是,为什么我在使用 OralOLEDB.Oracle 提供程序时收到这个疯狂的错误消息??? 有人知道吗?
预先感谢您...
PS。 我的计算机上安装了 oracle 9.2 和 oracle 10 的驱动程序。
I can't make myGeneration tool to work correctly.
This is the connection string that I use:
Provider=OraOLEDB.Oracle.1;Password=pass123;User ID=user1;Data Source=oradb1src;Persist Security Info=True
And when I click on Test connection I get:
[System.Data.OleDb.OleDbException] - ORA-12154: TNS:could not resolve service name
[oradb1src is well defined in tnsnames.ora. That is not the problem.]
But when I change the provider to MSDAORA, then connection works fine, but in the Generate window I'm missing the Tables tab on which I should be able to choose tables from my database. I've red somewhere that this is normal with MSDAORA provider, cause mygeneration uses oledb provider for meta data retrieval.
But, why do I get this insane error message when using OralOLEDB.Oracle provider??? Does anyone know?
Thank you in advance...
PS. I have drivers for oracle 9.2 and oracle 10 installed on my computer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我只在 tnsnames.ora 中未正确配置源时见过该错误。 由于其他提供商可以从您的计算机上看到数据库,因此我会尝试创建一个无 TNS 的连接字符串 (单击此处查看示例)以确保这不是问题。
I've only ever seen that error when the source wasn't correctly configured in tnsnames.ora. Since the other provider can see the database from your machine, I would try to create a TNS-less connection string (click here for an example) to make sure that's not the problem.
我有时遇到类似的错误 - 基本上,即使 Oracle(和 Toad)非常乐意在一台机器上支持多个 Oracle 客户端,Com 版本的数据提供程序(即任何不使用 Oracle 本机连接的连接方法)将默默地只使用一个您的客户。 我从来没有找到任何文档来确认如何选择要使用的客户端,因此不能强制它。 最有可能的是,您会发现您尝试使用的 Oracle 客户端不是提供商正在使用的客户端,并且提供商正在使用的客户端没有完整的 TNSNames 文件。
I have encountered a similar error on occasion - basically, even though Oracle (and Toad) quite happily support multiple Oracle clients on one machine, Com versions of the Data Provider (i.e. any connection method NOT using Oracle native connection) will silently only use one of your clients. I've never been able to find any documentation to confirm how the client to be used is selected, and so cannot force it. Most likely, you will find that the Oracle client you are trying to use is NOT the one being used by the provider, and that the one being used by the provider does not have a complete TNSNames file.
oracle 的连接字符串:
效果很好
Connection string for oracle:
It works well