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=jdbc:oracle:thin:@localhost:1521:oracle 注意localhost:1521:oracle中的oracle是数据库得sid换成你自己数据库的sid就可以
username:登陆数据库具有system权限的用户名
password:登陆数据库具有system权限的密码
点击add jar 选择ojdbc14.jar的存放位置,没有得可以到百度下一个叫ojdbc14.jar的文件。
点击test driver 到此成功配置。
关于启动数据库后提示ora-12505的解决方法:
"listener does not currently know of SID given in connect descriptor"
第一种可能
是配置得数据库sid名不正确localhost:1521:oracle 即红字部分不是你本机得sid,那么如何查看本机得sid呢?用如下命令 SELECT NAME FROM v$database;在sqlplus中执行就可以看到,把红字部分换成查询出来的sid就可以。
第二种可能
发现sid配置没有错误,但是还是报错,那可能就是oracle得监听配置出了问题,需要检查listener.ora文件,用记事本打开,
正确配置如下:
# listener.ora Network Configuration File: e:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = e:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = oracle)
(ORACLE_HOME = e:\oracle\product\10.2.0\db_1)
(SID_NAME = oracle)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
红字部分改成oracle创建时候的sid 保存退出。
---------------------------------------------------------------------
(SID_DESC =
(GLOBAL_DBNAME = oracle)
(ORACLE_HOME = e:\oracle\product\10.2.0\db_1)
(SID_NAME = oracle)
)
GLOBAL_DBNAME= 的内容是用SYSTEM用户登录之后新建sql执行以下代码 :SELECT NAME FROM v$database; 查询出来的数据就是等号后面的内容,切记两个红色字体的名称一定要相同
如果没有这段代码请复制到你的文件中,然后把ORACLE_HOME这个路径修改一下切记两个蓝色路径一定要相同
----------------------------------------------------------------------
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的更多相关文章
- Hive中导入Oracle数据错误:Listener refused the connection with the following error: ORA-12505
问题: 今天往Hive中导入Oracle数据的时候碰到了如下错误:Listener refused the connection with the following error: ORA-12505 ...
- Connection to Oracle failed. [66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor .
我安装了Oracle数据库,默认的数据库用户名是system,密码口令是安装过程中你自己设置的.可以先使用命令框,输入 sqlplus system; 然后再输入密码即可. 然后我的数据库连接工具使用 ...
- Listener refused the connection with the following error 错误解决
原文地址 :http://blog.csdn.net/zajin/article/details/17753351 做个备份: 查询数据库当前进程的连接数: select count(*) from ...
- Error while performing database login with the sqljdbc driver:Unable to create connection. Check your URL.
从微软官网下载jdbc驱动包sqljdbc4,运行sqljdbc_4.0.2206.100_chs.exe,将驱动包解压到了Microsoft JDBC Driver 4.0 for SQL Serv ...
- error while performing database login with the xxx driver
在MyEclipse的安装路径下D:\Program Files\MyEclipse 6.0\eclipse下面找到eclipse.ini文件,用记事本打开 eclipse.ini文件 -showsp ...
- Myeclipse连接Mysql数据库时报错:Error while performing database login with the pro driver:unable
driver template: Mysql connector/j(下拉框进行选择) driver name: 任意填,最好是数据库名称,方便查找 connection URL: jdbc:mysq ...
- 66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor oracle.n et.ns.NetException: Listener refuse
新装的idea开发工具后连接数据库出现如题所示错误. 1.网上搜了不少的文章,没有解决我的问题.后来细心看了一下url: 一开始url是这样子的. jdbc:oracle:thin:@:s21_pdb ...
- java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:list
package DisplayAuthors; import java.sql.*; public class DisplayAuthors { private static final Str ...
- 关于Oracle出现listener refused the connection with the ORA-12505错误,解决方案
出现listener refused the connection with the ORA-12505错误,解决方案: 1.首先重启一下电脑,释放被占用的1521端口 2.重启后打开Oracle D ...
随机推荐
- 3D-爱心
520把爱心送给她 用自己独有的方式表白,也是爱的一种体现! 所以呢,我就利用自己现有的知识,做了一个3D爱心! 今天是5月21日,博主在这里希望所有看到这个博客的朋友们能够拥有自己美好的爱情! 同时 ...
- IE9+下如何让input的placeholder样式生效
:-ms-input-placeholder.el-input__inner { color: #97a8be;}:-ms-input-placeholder.el-textarea__inner{ ...
- JavaSE——序列化和反序列化
序列化: 序列化对应写的操作.(读与写都是站在应用的角度上) 序列化就是一种用来处理对象流的机制,所谓对象流也就是将对象的内容进行流化.可以对流化后的对象进行读写操作,也可将流化后的对象传输于网络之间 ...
- loadrunner 脚本开发-web_custom_request函数详细介绍
脚本开发-web_custom_request函数详细介绍 by:授客 QQ:1033553122 c语言版本: int web_custom_request(const char *RequestN ...
- profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2
profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2 by:授客 QQ:103355312 ...
- Expo大作战(十四)--expo中消息推送的实现
简要:本系列文章讲会对expo进行全面的介绍,本人从2017年6月份接触expo以来,对expo的研究断断续续,一路走来将近10个月,废话不多说,接下来你看到内容,讲全部来与官网 我猜去全部机翻+个人 ...
- CentOS7安装mysql后无法启动服务,提示Unit not found
首发日期: 2018-01-30 现象: 在centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not found [明明已经安装了, ...
- react+spring 记录跨域问题的解决方法
react 跨域访问后台,默认是有跨域问题,并且火弧和谷歌浏览器,对跨域问题展示还不一样. 谷歌浏览器如下图: 此处状态是200,然而在Response却没有任何信息,如下图 然而火弧浏览器,对该问题 ...
- Web服务架构风格之REST
REST(Representational State Transfer)是一种Web服务的架构,其目的是创建具有良好扩展性的分布式系统.它的约束包含: 使用C/S模型.client和server之间 ...
- Google Play内购测试
Google Play内购测试 最近项目做海外版本,接入Google wallet支付后,测试验证比较繁琐,故记录一下. Google wallet支付方式接入完成后,需要按照如下步骤设置,才可以进行 ...