ORA-12545: 连接失败,因为目标主机或对象不存在
以前有人遇到过这个错误吗?我尝试参考此链接: http://www. ardentperf.com/2007/04/02/local_listener-and-ora-12545/
但这并不能真正解决我们的问题。我们的场景是我们能够连接到数据库,但是当我们尝试从视图中选择数据时,我们会遇到此错误。
我已启用客户端 sqlnet 跟踪,但我无法解释问题的确切原因。
有人有什么想法吗?
谢谢
Have anyone encounter this error before? I tried to refer to this link: http://www.ardentperf.com/2007/04/02/local_listener-and-ora-12545/
But it doesn't really resolve our issue. Our scenario is that we are able to connect to the database however we will encounter this error when we try to select data from a view.
I have enabled Client-side sqlnet trace but i am unable to interpret what is the exact cause of the issue.
Any ideas anyone?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对我来说,问题是未通过 TNSNAMES.ora 中的名称检测到主机,而是使用 IP 地址解决了该问题(我认为这是由于域控制器问题):
执行命令:“ping HOST”来查找服务器IP 地址。
编辑:
刚刚再次遇到这个问题,这次是防火墙通过端口阻止了 TCP。
For me the problem was the HOST was not being detected by name in the TNSNAMES.ora, using the IP address instead resolved it (I think its due to a domain controller issue):
Do a command: “ping HOST” to find the servers IP address.
Edit:
Just ran into this again, this time it was a Firewall blocking TCP via the port.
这个问题可能有多种原因:
1.您的 TNSNAMES.ora 不是最新的
修复:找到您的 Oracle 主目录
查找目录:/network/ADMIN/
如果您在本地计算机上遇到此问题,
TNSNAMES.ora 应该位于其中2。创建 TNS_ADMIN 环境变量
在我的例子中:
变量名称:TNS_ADMIN
值:C:\Programs\Ora10g\network\ADMIN
出于测试目的,请尝试使用 sqlplus 连接到 Oracle DB(您可能已经在尝试此操作)。
This issue can be multiple things:
1. Your TNSNAMES.ora isn't up to date
Fix: Find your Oracle Home
Find Directory: /network/ADMIN/
TNSNAMES.ora should be in there if you're experiencing this issue on a local machine
2. Create TNS_ADMIN Environmental Variable
In my case:
Variable Name: TNS_ADMIN
Value: C:\Programs\Ora10g\network\ADMIN
For testing purposes, try connecting to the Oracle DB using sqlplus (you may already be trying this).
我也遇到了这个问题,由于我没有使用 tnsnames.ora 文件,当我踩到这个 链接。
所以,现在我的代码如下所示:
现在您可以创建游标并编写查询。
注意:这不是推荐的做法,但我只是将其用于测试。
I also had this issue, and since I was not using a tnsnames.ora file, I almost gave up hope, when I stepped on this link.
So, now my code looks like this:
Now you can create a cursor and write your query.
Note: This is not a recommended practice, but I used it just for testing.
我收到此错误,原因是我试图连接错误的端口。
i've got this error and the reason for me was that I was trying to connect on the wrong PORT.