2

我在 Windows 7(PC #1)上运行 Oracle 11g(11.2.0.1.0),使用 Sql Developer、Sql Plus,一切似乎都很好。我还通过 Oracle JDeveloper、Forms、Reports 和 Designer 进行了连接,但都来自 PC #1。

我已经在 PC #2 上安装了 Oracle 客户端,并希望通过 Sql Plus(测试)然后通过 Oracle JDeveloper 和其他一些工具连接到 PC #1。我可以将桌面远程连接到 PC #1,所以这已经解决了

我需要知道如何在 PC #1 上使用正确的名称和 IP 地址设置“localhost”,以便 PC #2 可以通过 Oracle 工具进行连接。

(在 Oracle 上一篇文章的结尾,有人告诉我没有远程客户端可以使用 127.0.0.1 [即,“localhost”])作为主机名连接到侦听器。我还被告知这是一个网络问题,与 Oracle 无关,并且 IP 地址需要是可路由的,例如 10.10.10.10 或 192.168.0.13

那么我该如何解决呢?

这是我在 PC #1 上的 tnsnames,后面是侦听器状态

名称

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

监听器状态

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 05-AUG-2014 12:36:30

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 - Production
Start Date                04-AUG-2014 15:27:39
Uptime                    0 days 21 hr. 8 min. 54 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\app\Stephen\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         e:\app\stephen\diag\tnslsnr\Stephen-PC\listener\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 "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
4

0 回答 0