转自:https://blog.csdn.net/a657281084/article/details/49490069
问题:Oracle主服务和监听器服务已经启动,使用SQL Plus能够正常连接,使用PL SQL Developer连接报次错误:ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务。
如图:
解决:
1.结束OracleOraDb11g_home2TNSListener进程;
2.打开D:DevInstallOracle11gR2Administratorproduct11.2.0dbhome_1NETWORKADMIN(不同机器目录可能不同)目录下的listener.ora文件,添加红色部分;(添加错误的话无法启动OracleOraDb11g_home2TNSListener服务)
3.启动OracleOraDb11g_home2TNSListener服务后成功连接。
# listener.ora Network Configuration File:
D:DevInstallOracle11gR2Administratorproduct11.2.0dbhome_1
etworkadminlistener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:DevInstallOracle11gR2Administratorproduct11.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:DevInstallOracle11gR2Administratorproduct11.2.0dbhome_1inoraclr11.dll")
)
(SID_DESC =
(SID_NAME = ORCL)
(ORACLE_HOME = D:DevInstallOracle11gR2Administratorproduct11.2.0dbhome_1)
(ENVS = "EXTPROC_DLLS=ONLY:D:DevInstallOracle11gR2Administratorproduct11.2.0dbhome_1inoraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:DevInstallOracle11gR2Administrator
SID查看请参照此图: