无法连接到 Oracle 服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6774889/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:10:15  来源:igfitidea点击:

Cannot connect to Oracle server

oracledatabase-connection

提问by chance

I have a Oracle server which can be accessed locally (i.e. from the computer where Oracle installed) using SQLPlus and default port 1521.

我有一个 Oracle 服务器,它可以使用 SQLPlus 和默认端口 1521 在本地(即从安装 Oracle 的计算机)访问。

From a client computer, I can access shared folders on that server, but I cannot access the oracle database using SQLPlus or SQL Developer. "IO Error: The network Adapter could not establish the connection."

我可以从客户端计算机访问该服务器上的共享文件夹,但无法使用 SQLPlus 或 SQL Developer 访问 oracle 数据库。“IO 错误:网络适配器无法建立连接。”

I am sure that there are problems on the Oracle server, because I can access other similar Oracle servers from the same client.

我确定是在 Oracle 服务器上有问题,因为我可以从同一个客户端访问其他类似的 Oracle 服务器。

There is no problem with network connection as well.

网络连接也没有问题。

Tnsnames.ora files are also OK. Three oracle services are started (same as other similar Oracle servers): listener, DBConsole and Service.

Tnsnames.ora 文件也可以。启动了三个oracle 服务(与其他类似的Oracle 服务器相同):listener、DBConsole 和Service。

All are Windows systems.

都是Windows系统。

How can I figure it out?

我怎样才能弄清楚?

P.S.:No firewall on server; tnsping is OK.

PS:服务器没有防火墙;tnsping 没问题。

回答by Rob van Laarhoven

I think the listener on the server or tnsnames.ora on client is the problem. When connecting from the server the sql*net protocol is bypassed. On server run :

我认为服务器上的侦听器或客户端上的 tnsnames.ora 是问题所在。从服务器连接时,会绕过 sql*net 协议。在服务器上运行:

c:\lsnrctl status

and check if database is serviced by the listener and check if parameters are the same as in tnsnames.ora, use fully qualified host names.

并检查数据库是否由侦听器提供服务并检查参数是否与 tnsnames.ora 中的相同,使用完全限定的主机名。

EDITCheck

编辑检查

c:\lsnrctl services

c:\lsnrctl 服务

回答by Raje

May be your firewall block your port. you can enable this by changing firewall setting. This is windows 7 configuration to access port Control panel->system and security->windows firewall->advanced setting->In bound rules-> new Rule(On right hand side)-> select port option with value as "1521" -> next next....

可能是您的防火墙阻止了您的端口。您可以通过更改防火墙设置来启用此功能。这是访问端口的Windows 7配置控制面板->系统和安全->windows防火墙->高级设置->绑定规则->新规则(在右侧)->选择端口选项,值为“1521”- > 下一个 下一个....