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

第一步:打开Oracle Net Manager 

进行如下配置:




第二步:找到查看listener.ora文件:位于oracle 安装目录的app文件夹目录下面

我的位置是:G:\app\admin\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora,打开大致如下

# listener.ora Network Configuration File: G:\app\admin\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = G:\app\admin\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.217)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
  )

ADR_BASE_LISTENER = G:\app\admin\product\12.1.0\dbhome_1\log


第三步:添加一段配置:

在:

    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = G:\app\admin\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
    )
后面添加:

   (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = G:\app\admin\product\12.1.0\dbhome_1)  
      (SID_NAME = ORCL)
    )

添加完成的文件内容为:

# listener.ora Network Configuration File: G:\app\admin\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = G:\app\admin\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
    )
   (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = G:\app\admin\product\12.1.0\dbhome_1)  
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.217)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
  )

ADR_BASE_LISTENER = G:\app\admin\product\12.1.0\dbhome_1\log

SID_NAME 对应网络服务命名;GLOBAL_DBNAME 对应服务名,修改完成后重启服务就好了!





©️2020 CSDN 皮肤主题: 深蓝海洋 设计师:CSDN官方博客 返回首页