PLSQ连接数据库报ORA-12514错误的解决办法

在本机上装了Oracle 11g,用sql plus登陆数据库,正常。用pl/sql打开数据库报错:“ORA-12514: TNS: 监听程序无法识别连接描述符中请求的服务”。
解决:
 
打开d:\app\wanghui\product\11.2.0\dbhome_1\network\admin\listener.ora文件,内容如下:
 
# listener.ora Network Configuration File: d:\app\wanghui\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = d:\app\wanghui\prgoduct\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:d:\app\wanghui\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = d:\app\wanghui


将(SID_NAME = PLSExtProc)改为(SID_NAME = ora11g),接着删掉上述文件中的(PROGRAM = extproc),重启listener,用pl/sql登录,成功。

你可能感兴趣的:(oracle)