关于使用PL/SQL连接本地oracle时报错:ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务解决

转自:https://blog.csdn.net/a657281084/article/details/49490069

问题:Oracle主服务和监听器服务已经启动,使用SQL Plus能够正常连接,使用PL SQL Developer连接报次错误:ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务。

如图:


 

 

解决:

1.结束OracleOraDb11g_home2TNSListener进程;

2.打开D:\DevInstall\Oracle11gR2\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN(不同机器目录可能不同)目录下的listener.ora文件,添加红色部分;(添加错误的话无法启动OracleOraDb11g_home2TNSListener服务)

3.启动OracleOraDb11g_home2TNSListener服务后成功连接。

# listener.ora Network Configuration File: D:\DevInstall\Oracle11gR2\Administrator\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:\DevInstall\Oracle11gR2\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\DevInstall\Oracle11gR2\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
      (SID_NAME = ORCL)
      (ORACLE_HOME = D:\DevInstall\Oracle11gR2\Administrator\product\11.2.0\dbhome_1)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\DevInstall\Oracle11gR2\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )


ADR_BASE_LISTENER = D:\DevInstall\Oracle11gR2\Administrator


SID查看请参照此图:

posted @ 2018-05-09 15:55  就是小鱼儿  阅读(8676)  评论(0编辑  收藏  举报