下午,一个同事从公司借的笔记本上面的Oracle数据库出现连接不上的问题,一直报:
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
从字面判断是监听器的错误,于是重新配置了监听器,重启监控器服务,还是不能解决问题。
最后与正常的Oracle机上的listener.ora比较了一下,比对结果如下:
非正常Oracle配置:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\Server\oracle\product\10.2.0\db_1)
)
)
正常Oracle配置
SID_LIST_LISTENER =
[color=red](SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = E:\Server\oracle\product\10.2.0\db_1)
(SID_NAME = ORCL)
)[/color] (SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\Server\oracle\product\10.2.0\db_1)
)
)
上面已经用红色字体标示出来了,同事机器上的监听器配置文件中,SID列表中没有本地数据库配置。于是将数据库添加到SID列表中,重启监听器,一切正常喽。
[b]
有可能安装好数据库之后又修改主机名称也会导致这种问题[/b]
oracle 11G
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = E:\app\ypl\product\11.1.0\db_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
)
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
从字面判断是监听器的错误,于是重新配置了监听器,重启监控器服务,还是不能解决问题。
最后与正常的Oracle机上的listener.ora比较了一下,比对结果如下:
非正常Oracle配置:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\Server\oracle\product\10.2.0\db_1)
)
)
正常Oracle配置
SID_LIST_LISTENER =
[color=red](SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = E:\Server\oracle\product\10.2.0\db_1)
(SID_NAME = ORCL)
)[/color] (SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\Server\oracle\product\10.2.0\db_1)
)
)
上面已经用红色字体标示出来了,同事机器上的监听器配置文件中,SID列表中没有本地数据库配置。于是将数据库添加到SID列表中,重启监听器,一切正常喽。
[b]
有可能安装好数据库之后又修改主机名称也会导致这种问题[/b]
oracle 11G
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = E:\app\ypl\product\11.1.0\db_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
)