【Oracle】ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务

早上使用PL/SQL连接Oracle的时候,报错如下

image

解决办法:

找到文件listener.ora,新增以下红色区域,注意:路径需要根据自己的Oracle安装路径自行设置

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

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

ADR_BASE_LISTENER = D:\app\OLIVER

设置完成后以管理员的方式打开cmd,使用命令重启监听服务即可

image

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zggxfp.html