首页 热点资讯 义务教育 高等教育 出国留学 考研考公
您的当前位置:首页正文

连接oracle数据库出现:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor

2023-11-10 来源:华拓网

Java使用 

jdbc:oracle:thin:@11.1.0.14:1521:orcl

 

连接oracle数据库出现:

ORA-12505,TNS:listener does not currently know of SID given in connect descriptor

错误。

表明服务器上sid为orcl的服务并不存在,可以换个方式直接连接服务:把最后一个冒号换为斜杠。顺利连上数据库
jdbc:oracle:thin:@11.1.0.14:1521/orcl

 

连接oracle数据库出现:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor

标签:

小编还为您整理了以下内容,可能对您也有帮助:

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

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))
)
)

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

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))
)
)

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.75)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

devdb=

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.84)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME =devdb.ecp888.com)

)

)

oracle数据库创建连接时,我servername的值和sid的值一致,为什么还出现12505这个错误?

用oracle数据库新建连接时遇到ora-12505,此问题解决后又出现ora-12519错误,郁闷的半天,经过一番折腾问题解决,下面小编把我的两种解决方案分享给大家,仅供参考。

解决方案一:

今天工作时在新建连接的时候遇到ORA-12505,解决后又遇到ORA-12519错误。

ORA-12505:

之前用PL/SQL DEVELOPER和SQLPLUS 登录数据库都没有问题,就是应用程序通过JDBC连接Oracle时无法成功连接,出现ORA-12505错误listener does not currently know of SID given in connect descriptor......。

经过查找,发现Oracle的service_name 和sid_name不一致,而PL/SQL DEVELOPER和SQLPLUS 采用service_name进行连接,而应用程序是按照sid_name进行连接,所以出现PL/SQL DEVELOPER和SQLPLUS 能够连接而应用程序却无法连接的问题。

解决问题很简单,原来是自己将sid_name搞错了;首先查找当前实例的sid_name:SELECT INSTANCE_NAME FROM V$INSTANCE,然后把得到的sid_name填入应用程序的连接串中。

ORA-12519:

ORA-12505问题解决后,应用程序可以连接到Oracle,但是却报ORA-12519。经过查找发现这是由于参数的processes设定过低,因为专用服务器是一个连接建立一个服务器进程,该服务器的processes设定为150,session数设为170,而当前登录的session已经几乎达到processes的最大追问你这我之前在网上看过了,它只说不一致的办法,问题是我现在一样都出错

显示全文