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这个路径修改一下切记两个蓝色路径一定要相同

----------------------------------------------------------------------

原文地址:https://www.cnblogs.com/lijinze-tsinghua/p/8577023.html

时间: 2024-10-11 01:40:40

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的相关文章

Listener refused the connection with the following error 错误解决

原文地址 :http://blog.csdn.net/zajin/article/details/17753351 做个备份: 查询数据库当前进程的连接数: select count(*) from v$process; 查看数据库当前会话的连接数: elect count(*) from v$session; 查看数据库的并发连接数: select count(*) from v$session where status='ACTIVE'; 查看当前数据库建立的会话情况: select sid

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

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 Server文件夹下,在Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\auth下有两个文件夹x64和x86,这两个文件夹下都有一个sqljdbc_auth.dll文件,将x64文件夹里面的sqljdbc_auth.dll文件拷贝到windo

java.sql.SQLException: Listener refused the connection with the following error

jdbc连接ORACLE数据库时出现如题错误的一种可能: //oracle连接标识        String url = "jdbc:oracle:thin:@192.168.0.200:1521:orcl"; 必须与 文件:oracle\product\10.2.0\db_1\network\admin\tnsnames.ora中: RHORCL =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP

Listener refused the connection with the following error: ORA-12528, TNS: listener: all appropriate instances

oracle 11G,连接时突然报这个错误,无法连接,重启电脑也不行. 经测试,先把电脑网络断开,再重启电脑,重新打开oracle,点击连接,此时正常.此时电脑再连上网络

关于Oracle出现listener refused the connection with the ORA-12505错误,解决方案

出现listener refused the connection with the ORA-12505错误,解决方案: 1.首先重启一下电脑,释放被占用的1521端口 2.重启后打开Oracle Develpoer 3.然后运行cmd,打开命令提示符,输入命令lsnrctl先运行stop,然后再start 4.打开资源管理器,运行C:\oraclexe\app\oracle\product\10.2.0\server\BIN\tnslsnr.exe HKEY_LOCAL_MACHINE\SYS

解决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

Error page: /dede/login.php Error infos: No database

登陆dede后台这样提示Error page: /dede/login.php Error infos: No database selected Error sql: Select admin.*,atype.purviews From `dede_admin` admin left join `dede_admintype` atype on atype.rank=admin.usertype where admin.userid like 'admin' limit 0,1登陆dede后台