当前位置: 代码迷 >> Oracle管理 >> oracle连接
  详细解决方案

oracle连接

热度:56   发布时间:2016-04-24 05:06:11.0
oracle连接求助
系统:xp
oracle:10.2
服务端和客户端都在一个内网

服务器端的TNS和orcl实例服务都开启了,并且在服务器端用plsql可以登录操作。但是在客户端远程登录却提示“无监听程序”。我在客户端telnet 1521端口提示连接失败。



两台机是可以ping得通的

服务端的配置:
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBANAME = orcl)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(SID_NAME = orcl)
)
)

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

tnsnames.ora

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

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

sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


客户端的配置
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

tnsnames.ora

SZERPS =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.103)(PORT = 1521))
  )
  (CONNECT_DATA =
  (SERVICE_NAME = orcl)
  )
  )


------解决方案--------------------
DNS配置问题
------解决方案--------------------
服务器的 1521端口 有没有打开,
把你服务器的地址,服务器名 写到c:\..\system32\..\etc\hosts 

------解决方案--------------------
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
====================================================================
你在侦听 127.0.0.1

SZERPS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.103)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
==============================================================
却访问 192.168.1.103


把侦听地址从 127.0.0.1 改成 192.168.1.103
然后
lsnrctl stop
lsnrctl start
重启监听
  相关解决方案