如何从PC#2(运行Oracle客户端)连接到PC#1(运行Oracle)

时间:2014-08-05 21:01:35

标签: networking windows-7 oracle11g tcp-ip oracle-client

我在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 Client,并希望通过Sql Plus(测试)连接到PC#1,然后通过Oracle JDeveloper和其他一些工具连接。我可以远程桌面到PC#1,以便已经解决了

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

(在上一篇关于Oracle的帖子的末尾,我被告知没有远程客户端可以使用127.0.0.1 [即,#34; localhost"])作为主机名连接到监听器。我还被告知这是一个网络问题,与Oracle无关,并且IP地址需要是可路由的,例如10.10.10.10或192.168.0.13

那我该如何解决?

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

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

0 个答案:

没有答案