1

我在这里安装了

widows server 2008 64
orale 11g r2 64

现在我想从我设置为我的服务器不工作的IP地址访问它我无法通过IP地址访问......

当我在我的应用程序上使用时.....本地主机它可以连接但是当我添加 ip 例如 10.0.0.2 时它没有连接

现在,当我写 IP 地址时,它也只是在本地,它没有连接,但使用 localhost 可以正常工作.....

所以即使我用过监听器。跑完之后

C:\>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 10-NOV-2013 02:28
:36

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date                10-NOV-2013 02:18:36
Uptime                    0 days 0 hr. 10 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\app\Administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
Listener Log File         c:\app\administrator\diag\tnslsnr\WIN-3ALDRUD96NE\list
ener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "pat_live" has 1 instance(s).
  Instance "patlive", status READY, has 1 handler(s) for this service...
Service "pat_test" has 1 instance(s).
  Instance "pattest", status READY, has 1 handler(s) for this service...
Service "patliveXDB" has 1 instance(s).
  Instance "patlive", status READY, has 1 handler(s) for this service...
Service "pattestXDB" has 1 instance(s).
  Instance "pattest", status READY, has 1 handler(s) for this service...
The command completed successfully

C:\>

问候

4

3 回答 3

7

是的,当您的主机名设置被错误地检测到时,就会发生这种情况。登录运行数据库的服务器,运行:

lsnrctl status

您很可能会看到侦听器在 localhost/127.0.0.1 上侦听,而不是在可从网络访问的地址上。

找到 listener.ora 文件(lsnrctl status 命令显示它的完整路径),编辑它,例如:

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

然后重新启动监听器。

lsnrctl stop
lsnrctl start

或者使用Windows中的“服务”管理控制台重启监听服务。

于 2013-11-10T10:02:55.193 回答
0

语境:

适用于 64 位 Windows 的 LSNRCTL:版本 12.1.0.2.0

脚步:

  1. lsnrctl 停止
  2. 将侦听器主机从 localhost 更改为特定服务器 IP
    示例路径:C:\app\root\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora
  3. lsnrctl 启动
  4. 检查:lsnrctl status
于 2018-07-03T06:44:15.317 回答
-1

Check that the IP address and port of the server machine is correct and that you can ping it from the other machine. If it is correct and you can ping it, you need to reconfigure the firewall that is preventing you connecting on that port. It could be a firewall on the server itself, or somewhere else on your network.

于 2013-11-10T09:54:40.213 回答