oracle19c ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

场景:windows本地安装了oracle19c,使用sql plus可正常登录,如图:

oracle19c ORA-12514, TNS:listener does not currently know of service requested in connect descriptor_第1张图片

使用DBeaver,如图主机填写的是本机具体IP地址,就无法连接,如图:

oracle19c ORA-12514, TNS:listener does not currently know of service requested in connect descriptor_第2张图片

报错信息如下:

Listener refused the connection with the following error:

ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

解决方法:

进入之前安装oracle19c的源目录,例如:

D:\WINDOWS.X64_193000_db_home

依次进入

D:\WINDOWS.X64_193000_db_home\network\admin

修改listener.ora文件,原内容如下:

# listener.ora Network Configuration File: D:\WINDOWS.X64_193000_db_home\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\WINDOWS.X64_193000_db_home)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\WINDOWS.X64_193000_db_home\bin\oraclr19.dll")
    )
  )

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

在SID_LIST_LISTENER中新增

    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = D:\WINDOWS.X64_193000_db_home)
      (SID_NAME = ORCL)
    )

修改后如下:

oracle19c ORA-12514, TNS:listener does not currently know of service requested in connect descriptor_第3张图片

重新启动监听服务

oracle19c ORA-12514, TNS:listener does not currently know of service requested in connect descriptor_第4张图片

如果就可以通过localhost访问,也可以通过ip地址访问,可如下配置监听,并重启监听服务,如图:

oracle19c ORA-12514, TNS:listener does not currently know of service requested in connect descriptor_第5张图片

你可能感兴趣的:(Oracle,oracle,oracle19c,listener)