本文介绍了IO错误:网络适配器无法建立与Oracle 11gR2的连接。连接SQL开发人员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在RedHat6 linux实例上安装了Oracle 11g,通过执行我正在尝试从远程机器连接到数据库使用sql开发人员。但总是以 - IO错误:网络适配器无法建立连接

$



结束。我使用的是

 用户名:sys as sysdba 
密码:< oracle password>
主机名:安装Oracle SQL的服务器的IP地址。
端口:1521
SID:testdb



我还创建了一个监听器。 ora文件在位置 - /oracle/product/11.2.0/db_1/network/admin,因为它之前不存在。其内容是 -

  SID_LIST_LISTENER = 
(SID_LIST =
(SID_DESC =
= PLSExtProc)
(ORACLE_HOME = /u01/oracle/product/11.2.0/db_1)
(PROGRAM = extproc)



LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS =(PROTOCOL = IPC)(KEY = EXTPROC_FOR_TESTDB))
(ADDRESS =(PROTOCOL = TCP)(HOST = 173.39 .238.15)(PORT = 1521)



DEFAULT_SERVICE_LISTENER =(TESTDB)

我已经在dba.stackexchange发布了这个问题。但我需要尽快解决这个问题。并需要帮助。因此也张贴在这里。



你能告诉我我可能做错了什么。



感谢。



EDIT 输出lsnrctl status p>

>

连接到
(DESCRIPTION =(ADDRESS =(PROTOCOL = IPC)(KEY = EXTPROC_FOR_TESTDB)))
TNS- 12541:TNS:无监听器TNS-12560:TNS:协议适配器错误

TNS-00511:无监听器Linux错误:2:没有此类文件或目录
连接到
=(ADDRESS =(PROTOCOL = TCP)(HOST = 173.39.238.15)(PORT = 1521)))
TNS-12541:TNS:无监听TNS-12560:TNS:协议适配器错误

TNS-00511:无侦听器Linux错误:111:连接被拒绝



解决方案

侦听器未运行。在数据库服务器上, ps -ef | grep lsnr 查看是否有一个PID运行 tnslsnr 。如果没有,那么你需要用 lsnrctl start 启动监听器。


I have installed Oracle 11g ON a RedHat6 linux instance, by following all the steps mentioned in "http://technologylair.net/2013/08/oracle-11g-installation-linux/#comment-50" I am trying to connect to the database from a remote machine using the sql developer. But always ending up with - "IO Error: The Network Adapter could not establish the connection".

The parameters i am using are

Username: sys as sysdba
Password: <oracle password>
Hostname: IP address of the server on which Oracle SQL is installed.
Port: 1521
SID: testdb

I have also created a listener.ora file at location - "/oracle/product/11.2.0/db_1/network/admin", as it was not present before. Whose contents are -

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/oracle/product/11.2.0/db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_TESTDB))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 173.39.238.15)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (TESTDB)

I have posted this question on dba.stackexchange too. but i need to get this resolved as soon as possible. and need help. Hence posting it here too.

Can you please tell me what i might be doing wrong.

Thanks.

EDIT the out put of "lsnrctl status"

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_TESTDB))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error
TNS-00511: No listener Linux Error: 2: No such file or directory Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=173.39.238.15)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error
TNS-00511: No listener Linux Error: 111: Connection refused

解决方案

Looks like your listener is not running. On the DB server, ps -ef | grep lsnr to see if there's a PID running tnslsnr. If not, then you need to start the listener with lsnrctl start.

这篇关于IO错误:网络适配器无法建立与Oracle 11gR2的连接。连接SQL开发人员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 06:46