Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oracle 11g XE-远程连接问题(发生连接超时)_Oracle_Oracle11g_Ora 12170 - Fatal编程技术网

Oracle 11g XE-远程连接问题(发生连接超时)

Oracle 11g XE-远程连接问题(发生连接超时),oracle,oracle11g,ora-12170,Oracle,Oracle11g,Ora 12170,Oracle新手,正在尝试使用11g XE设置Oracle开发环境。本地连接与sqlplus和SQL Developer配合使用很好-远程连接似乎看不到数据库。我在不同的机器上尝试了以下文件的各种配置(借助google和oracle文档帮助),但我甚至无法让客户端注册服务器的存在。我目前的配置如下: 服务器(ip 192.168.0.51): listener.ora 特斯奈姆斯·奥拉 sqlnet.ora lsnrctl stat的输出 netstat的输出-an | find“1521” 在

Oracle新手,正在尝试使用11g XE设置Oracle开发环境。本地连接与sqlplus和SQL Developer配合使用很好-远程连接似乎看不到数据库。我在不同的机器上尝试了以下文件的各种配置(借助google和oracle文档帮助),但我甚至无法让客户端注册服务器的存在。我目前的配置如下:

服务器(ip 192.168.0.51): listener.ora 特斯奈姆斯·奥拉 sqlnet.ora lsnrctl stat的输出 netstat的输出-an | find“1521” 在服务器上,我可以连接以下设备(不知道这是否有意义,即通过tcp):

非端口1521诊断 我已经在服务器和客户端机器上禁用了防火墙


我哪里会出错?

显然无法联系到您的主机。对IP地址进行正常ping的结果是什么?您使用Wifi连接,您的主机是否使用有线连接?一些路由器阻止从无线到有线网络客户端的访问。Als检查:感谢@NonPlusUltra-我在上面添加了ping结果,并且我尝试了有线/非有线连接-这两种连接似乎都在1521以外的端口上工作。我尝试了您的链接中推荐的内容,但我的sqlplus版本似乎无法识别语法。我使用的是
SQL*Plus:release11.2.0.1.0生产版
,我尝试了
sqlplus/@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.51)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE))
我认为需要在连接字符串的TNS部分加上单引号:
sqlplus/@(DESCRIPTION=(地址列表=(地址=(协议=TCP)(主机=192.168.0.51)(端口=1521)))(连接数据=(服务名称=XE))”
。您可能缺少最后一个右括号。
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.51)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)
XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.51)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
    ) 
    (CONNECT_DATA = 
      (SID = CLRExtProc) 
      (PRESENTATION = RO) 
    ) 
  ) 
# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NONE)
NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT)
C:\Windows\system32>lsnrctl stat

LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 30-MAR-2015 18:31
:48

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Produ
ction
Start Date                30-MAR-2015 17:58:16
Uptime                    0 days 0 hr. 33 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   C:\oraclexe\app\oracle\product\11.2.0\server\network\a
dmin\listener.ora
Listener Log File         C:\oraclexe\app\oracle\diag\tnslsnr\Enterprise\listene
r\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.51)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.51)(PORT=8080
))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
  Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
  Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\Windows\system32>netstat -an | find "1521"
  TCP    192.168.0.51:1521      0.0.0.0:0              LISTENING
  TCP    192.168.0.51:1521      192.168.0.51:3280      ESTABLISHED
  TCP    192.168.0.51:3280      192.168.0.51:1521      ESTABLISHED
sqlplus <user>/<pass>@192.168.0.51:1521/xe
C:\>sqlplus <user>/<pass>@192.168.0.51:1521/xe

SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 30 18:14:17 2015

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

ERROR:
ORA-12170: TNS:Connect timeout occurred
PS C:\Users> Test-NetConnection 192.168.0.51 -Port 1521
WARNING: TCP connect to 192.168.0.51:1521 failed


ComputerName           : 192.168.0.51
RemoteAddress          : 192.168.0.51
RemotePort             : 1521
InterfaceAlias         : Wi-Fi
SourceAddress          : 192.168.0.88
PingSucceeded          : True
PingReplyDetails (RTT) : 1165 ms
TcpTestSucceeded       : False
PS C:\Users> ping 192.168.0.51

Pinging 192.168.0.51 with 32 bytes of data:
Reply from 192.168.0.51: bytes=32 time=5ms TTL=128
Reply from 192.168.0.51: bytes=32 time=7ms TTL=128
Reply from 192.168.0.51: bytes=32 time=4ms TTL=128
Reply from 192.168.0.51: bytes=32 time=32ms TTL=128

Ping statistics for 192.168.0.51:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 4ms, Maximum = 32ms, Average = 12ms

PS C:\Users> Test-NetConnection 192.168.0.51 -Port 80


ComputerName           : 192.168.0.51
RemoteAddress          : 192.168.0.51
RemotePort             : 80
InterfaceAlias         : Wi-Fi
SourceAddress          : 192.168.0.88
PingSucceeded          : True
PingReplyDetails (RTT) : 1920 ms
TcpTestSucceeded       : True