◎筱米加步枪◎.Blog

Happy coding

Oracle出现ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务解决方法

遇到此问题多次了,于是决定记一下.

找到listener.ora文件打开,

# listener.ora Network Configuration File: f:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = f:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
      (SID_DESC =
        (GLOBAL_DBNAME = ORCL)
        (ORACLE_HOME = f:\oracle\product\10.2.0\db_1)  
        (SID_NAME = ORCL)
    )

  )

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

上面红色标记部分为增加的部分,根据具体数据库安装的不同,分别更改GLOBAL_DBNAME、ORACLE_HOME、SID_NAME三个值,然后重新启动Oracle服务即可