jdbc连接oracle11g出现ora-12505错误怎么解决

2024-12-19 10:03:21
推荐回答(3个)
回答1:

ORA-12505解决2010-09-09 22:41在使用oracle时遇到了一个问题:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:orcl

查阅了很多网上的内容,知道了是oracle 的sid注册有问题。

按照网上的步骤解决如下:
1.在oracle目录下查找listener.ora文件,修改成如下格式的:
# listener.ora Network Configuration File: D:\oracle10g\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle10g)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = D:\oracle10g)
(SID_NAME = orcl)
)
)

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

回答2:

看下面的参考资料吧

回答3:

你没连上oracle服务器吧