環境:centos7+oracle 11gr2sql
公網:固定IPcentos
症狀:1521端口正常,netmanager配置測試正常,plsql鏈接提示ORA-12514: TNS:listener does not currently know of service requested in connect descriptororacle
解決辦法:tcp
增長SID_LIST_LISTENER= ide
LISTENER= 測試
(DESCRIPTION= centos7
(ADDRESS_LIST= spa
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) .net
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))) code
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