ORA-12154: TNS: 无法解析指定的连接标识符
当我安装服务器版本和现有的 Oracle 10g 客户端版本时,问题就开始了。
背景:安装了 Oracle 客户端版本 10g(位于 c:/oracle)以连接到位于其他国家/地区的数据库。所以我们只能连接到它并且对它的访问权限有限。
路径=> c:/oracle/ora_client/network/admin/listener.ora
因此,为了以管理员身份工作,我在 Windows 上的同一位置 c:/oracle 安装了 10g 服务器。我现在可以当服务员了。
路径=> c:/oracle/product/db_1/network/admin/listener.ora
但是,当我尝试连接安装的应用程序以将连接设置为客户端(与驻留在其他国家/地区的服务器)时,就会出现问题,它会失败并引发错误ORA-12154。
那么,我是否必须卸载我的服务器版本(以防万一由于存在两个 Oracle 数据库而导致混乱)?
我该如何修复它?可能的原因是什么?请指教!
The issue started when i installed the server version with already existing client version of Oracle 10g.
Background : The Oracle client version 10g was installed (at c:/oracle) to connect to a database residing in other country. So we can just connect to it and have limited access to it.
Path => c:/oracle/ora_client/network/admin/listener.ora
So to work as admin I installed 10g server at the same location c:/oracle on windows. I can now work as server.
Path => c:/oracle/product/db_1/network/admin/listener.ora
But the issue arises when I try to connect with my application installed to setup connection as a client (to server residing in other country), it fails and throws an error ORA-12154.
So, do I have to uninstall my server version (just in case the confusion might have arrived due to the presence of two Oracle databases)?
How can I fix it? What has been the probable cause for it? Please advise!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您安装服务器版本时,它会更新环境变量以指向服务器安装而不是客户端安装。 TNS 别名的定义是在 tnsnames.ora 中完成的,而不是在listener.ora 中完成的。因此,您必须将现有条目从 c:/oracle/ora_client/network/admin/tnsnames.ora 复制到 c:/oracle/product/db_1/network/admin/tnsnames.ora。请注意遵守 tnsnames.ora 格式。
When you installed the server version it updated the environment variables to point to the server installation and not the client installation. The definition of TNS aliases is done in tnsnames.ora and no the listener.ora. So you would have to copy the already existing entries from c:/oracle/ora_client/network/admin/tnsnames.ora to c:/oracle/product/db_1/network/admin/tnsnames.ora. Be careful that you obey the tnsnames.ora format.
我今天遇到了这个错误。花了很多时间检查我在配置侦听器时做错了什么。即使我使用 netca 配置它之后,我仍然遇到相同的错误:
原因似乎是包含“@”字符的系统密码错误。
例如,当您按如下方式连接时:
响应是
就是这样。非常简单的情况。
I faced this error today. Spent a lot of time checking what I did wrong while configuring listener. Even after I configured it using netca I still had the same error:
It appeared that the cause was bad password for sys containing '@' character.
For example when you connect as below:
The response is
That is it. Very easy case.