在安装ORACLE 11G 过程中由于配置的原因,安装过程中报了如下错误:
按照安装提示执行后面的操作后,打开PL/SQL DEVELOPER 连接
数据库时总报ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务!
ORACLE NET MANAGER里面测试,测试服务是否能够成功。结果还是报如上错误
在网上百度了一下这个错误ORA-12514,原来很多人都碰到过这个问题,于是按照别人的处理步骤依依配置了,这个问题解决了,不过还是觉得有必要把这个问题解决的步骤记录下来,一来让自己能跟深刻的体会一下,锻炼一下总结能力,二来可以帮助到以后碰到这个问题的人。
先找到找到listener.ora 文件,实验机器位于:E:\app\kerry\product\11.2.0\dbhome_1\NETWORK\ADMIN 目录下的listener.ora文件。问题都在这个文件上。
该文件初始如下所示:
# listener.ora Network Configuration File: E:\app\kerry\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 = E:\app\kerry\product\11.2.0\dbhome_1)
(PROGRAM = extproc) www.2cto.com
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\kerry\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.32.106)(PORT = 1521))
)
)
ADR_BASE_LISTENER = E:\app\kerry
解决办法:
在
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\tools\oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\tools\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
后面添加
(SID_DESC =
(GLOBAL_DBNAME = orcl.20.32.106 )
(ORACLE_HOME = E:\tools\oracle\product\11.2.0\dbhome_1)
(SID_NAME = ORCL)
)
添加后的文件内容:
# listener.ora Network Configuration File: E:\app\kerry\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 = E:\app\kerry\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\kerry\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = orcl.20.32.106)
(ORACLE_HOME = E:\app\kerry\product\11.2.0\dbhome_1)
(SID_NAME = ORCL) www.2cto.com
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.32.106)(PORT = 1521))
)
)
ADR_BASE_LISTENER = E:\app\kerry
注意SID_NAME对应网络服务命名, GLOBAL_DBNAME对应服务名。配置这些后,然后重新开启服务从新连接,OK,问题迎刃而解!