Oracle 外网访问

环境:centos7+oracle 11gr2

公网:固定IP

症状:1521端口正常,netmanager配置测试正常,plsql连接提示ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

解决办法:

增加SID_LIST_LISTENER=

 

LISTENER=

(DESCRIPTION=

(ADDRESS_LIST=

(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))

(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(SID_NAME=plsextproc)

(ORACLE_HOME=/oracle10g)

(PROGRAM=extproc)))

 

参考:https://docs.oracle.com/cd/B28359_01/network.111/b28316/listenercfg.htm

 

 

需要密切注意TNSNAMES中的服务名称是否能全部显示,有时加载一部分就是解析没有通过,在配置信息没问题的情况下,PLSQL无法解析,报 could not resolve the connect identifier specified

 

附WINDOWS下的配置

# listener.ora Network Configuration File: d:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = d:\oracle\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:d:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = d:\oracle\product\11.2.0\dbhome_1)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = bjzy-mes-oracle)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = d:\oracle

 

你可能感兴趣的:(Oracle 外网访问)