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

当创建完毕oracle数据库以及监听器时候,连接数据库时会报如题错误,只需要在D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN目录下的listener.ora中添加如下语句即可:

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

  )


LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.22.168)(PORT = 1521))
  )


ADR_BASE_LISTENER = D:\app\Administrator


其中红色部分为手动添加,然后重启oracle服务以及监听器即可连接成功。


 

你可能感兴趣的:(ORA-12514)