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

这种情况一般因为数据库的实例名没有给,只给了数据库的服务名

什么是数据库实例名?  数据库实例名是用于和操作系统进行联系的标识,就是说数据库和操作系统之间的交互用的是数据库实例名。实例名也被写入参数文件中,该参数为instance_name,在winnt平台中,实例名同时也被写入注册表。  数据库名和实例名可以相同也可以不同。  在一般情况下,数据库名和实例名是一对一的关系,但如果在oracle并行服务器架构(即oracle实时应用集群)中,数据库名和实例名是一对多的关系。

这种情况一般因为数据库的实例名没有给,只给了数据库的服务名
select INSTANCE_NAME from v$instance;

如何解决呢?
ORASESSION有个DataTypeMap属性

这里可以填上服务名

程序其实可以不用改,只用在服务名前加上sn=就可以了。

这是和用实例名唯一差别的地方

时间: 2024-12-27 09:29:59

ORA-12505, TNS:listener does not currently know of SID given in connect desc .的相关文章

解决Oracle ORA-12505, TNS:listener does not currently know of SID given in connect(转)

http://anthon-lx.iteye.com/blog/811460 完整的错误信息如下: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by th

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

完整的错误信息如下: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: 192.168.149.128:1521:orcl

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

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

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

问题描述: 在使用JDBC连接数据库的时候,报错: java.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决方案: 经检查,是由于连接的URL写错导致,原URL:"jdbc:oracle:thin:@localhost:152

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

引子: 本项目在老电脑上用的是oracle10g,换新电脑装的是oracle11g,但运行项目本没有什么关系,本来说创建个用户,用PLSQL手工导入数据,再改几下配置文件即可跑起来--但实际启动中遇到以下异常导致eclipse不能启动: 2016-01-25 11:34:39,694 DEBUG (com.mchange.v2.resourcepool.BasicResourcePool:1831) - An exception occurred while acquiring a poolab

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

oracle中log.xml报错信息 plsql登录报错信息: 无法请求描述符中的服务 百度了很多,都是一种处理方法,可是对我这里完全不管用,下面是我遇到的两次异常的解决方法: 1.看/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora这个配置文件 # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/ne

ORA-12514: TNS:listener does not currently know of service requested in connect

1,登录报错如下: [oracle@oracle_yueworld admin]$ rlwrap sqlplus system/system51@st1 SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 16:33:26 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. ERROR: ORA-12514: TNS:listener does not currently k

Oracle中Error while performing database login with the XXXdriver; Listener refused the connection with the following error; ORA-12505,TNS:listener does not currently know of SID given inconnect descrip

欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入oracle   connection URL=j

listener does not currently know of SID given in connect descriptor

一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入oracle   connection URL=jdbc:oracle:thin:@localhost:1521:oracle 注意localhost:1521:oracle中的oracle是数据库得s