但行好事
莫论前程❤

ORA-12514

报错描述:

eclipse启动服务好使,pl/sql连接oracle正常、myEclipse连接oracle报错如下:

ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
127.0.0.1:1521/orcl

解决方案

修改两个配置文件

  • tnsnames.ora
  •  listener.ora
E:\app\liupenggc\product\11.2.0\dbhome_1\NETWORK\ADMIN

listener.ora

修改前配置文件为

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = E:\app\liupenggc\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\liupenggc\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = E:\app\liupenggc

修改后配置文件为:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = E:\app\liupenggc\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\liupenggc\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL) 
      (ORACLE_HOME = E:\app\liupenggc\product\11.2.0\dbhome_1)
      (SID_NAME = ORCL)
    )
  )

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

ADR_BASE_LISTENER = E:\app\liupenggc

(ORCL — 是你的SID 数据库名)

tnsnames.ora

将localhost修改为127.0.0.1   因为有些时候映射不过去。

重启Oracle的监听器。

赞(1) 打赏
未经允许不得转载:刘鹏博客 » ORA-12514
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏