使用Oracle SQL Developer连接到Oracle 12c(远程) [英] Connecting to oracle 12c using Oracle Sql developer (remote)

查看:611
本文介绍了使用Oracle SQL Developer连接到Oracle 12c(远程)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用Oracle SQL Developer远程连接到Oracle 12c.它显示了在连接服务器期间的以下错误:

I have been trying to connect to Oracle 12c remotely by using Oracle SQL developer. It shows the below error during connecting to the server :

 Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection 

我确实可以连接到服务器上的oracle数据库,但是问题是有关远程连接到该服务器(数据库)的问题

I do can connect to oracle database on the server, but the problem is regarding to connect to this server (database) remotely

listener.ora的内容是:

The content of my listener.ora is :

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
  (SID_NAME = CLRExtProc)
  (ORACLE_HOME = D:\app\ORCLNEWUSER\product\12.1.0\dbhome_1)
  (PROGRAM = extproc)
  (ENVS =  "EXTPROC_DLLS=ONLY:d:\app\ORCLNEWUSER\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =      
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))     
)
)

推荐答案

您的listener.ora表示仅在localhost(127.0.0.1)上侦听,因此除服务器外,其他任何地方都无法连接;在服务器的外部IP地址上的端口1521上没有侦听任何内容.您可以使用lsnrctl statusnetstat -ano | find "1521"进行验证.

Your listener.ora says that is only listening on localhost (127.0.0.1), so nothing will be able to connect from anywhere except the server; there is nothing listening on port 1521 on the server's external IP address. You can verify that with lsnrctl status and netstat -ano | find "1521".

您需要修改listener.ora以侦听服务器的主机名,或者,如果该主机名不能解析为正确的IP,则使用外部IP地址本身-您尝试从中连接到的有效IP地址" SQL开发人员:

You need to modify the listener.ora to listen on your server's hostname, or if that isn't resolvable to the correct IP, the external IP address itself - the 'valid IP address' you're trying to connect to from SQL Developer:

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =      
  (ADDRESS = (PROTOCOL = TCP)(HOST = my_hostname_or_ip)(PORT = 1521))     
)
)

您可能还需要检查数据库是否能够成功注册.在进行更改并重新启动侦听器之前和之后,我将验证它是否包含在lsnctrl services中.如果重新启动后它没有出现,并且alter system register没有使它出现,那么您可能需要更改local_listener数据库参数,以告诉它应向其注册的地址和端口.这确实是一个单独的问题,但可以从此更改中继续进行. 此处有一个示例,如果有的话可能会有所帮助.

You may also need to check that your database is able to register successfully. I'd verify if it is included in lsnctrl services before and after you make that change and restart the listener. If it doesn't appear after the restart, and alter system register doesn't make it appear, then you might need to change the local_listener database parameter to tell it the address and port it should register against. That's a separate issue really but could follow on from this change; there's an example here which might help if it does.

这篇关于使用Oracle SQL Developer连接到Oracle 12c(远程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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