奇怪的ORA-12154错误 [英] Strange ORA-12154 error

查看:64
本文介绍了奇怪的ORA-12154错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

情况如下:我们开发了一个C#(。Net 1.1)程序,它将连接到远程Oracle 9i数据库。我们将以下连接字符串传递给OracleConnection对象:

Here's the situation: We developed a program in C# (.Net 1.1) that will connect to a remote Oracle 9i database. We are passing the following connection string to the OracleConnection object:

" Data Source = MyDataSource; User ID = MyUserID; Password = MyPassword; pooling = false;"

"Data Source=MyDataSource;User ID=MyUserID;Password=MyPassword;pooling=false;"

调用OracleConnection.Open时,我们收到"ORA-12154:TNS:无法解析服务名称"。 我们知道这个错误意味着什么。令我们困惑的是,当我们使用相同的连接参数登录到同一台机器上的SQLPlus,TOAD或任何其他Oracle
客户端程序时,我们可以成功连接。但是,程序拒绝连接发出此错误。

When calling OracleConnection.Open we are getting an "ORA-12154: TNS:could not resolve service name".  We know what this error means. What puzzles us is that when we use the same connection parameters to login to SQLPlus, TOAD or any other Oracle client program from the same machine we can connect successfully. However, the program refuses to connect giving out this error.

TNSNames.ora文件位于指向网络中位置(不同计算机)的映射驱动器中。 SID 已定义且格式正确(同样,我们可以与SQLPlus等连接)

The TNSNames.ora file is located in a mapped drive pointing to a location in the network (a different machine). The SID is defined and well-formed (again, we are able to connect with SQLPlus, etc.)

任何建议都非常欢迎!如果您需要更多信息,请告诉我。我很乐意提供。

Any suggestions to try are very welcomed! Let me know if you need more info, I will gladly provide.

谢谢,

Carlos

推荐答案

也许这不是你问题的最佳论坛。
Maybe this is not the best forum for your question.


这篇关于奇怪的ORA-12154错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆