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:
127.0.0.1:1521:ORCL
==========================================
字符串连接
//定义驱动程序
   String DBDRIVER = "oracle.jdbc.driver.OracleDriver";
   //定义链字符串
   String url = "jdbc:oracle:thin:@127.0.0.1:1521:ORCL";
=========================================
字符串连接正确,密码,用户名正确,昨天刚做的,一起运行正常,今天就发生这个错误了,是什么回事啊,我用的是ORCALE10G的 

解决方案 »

  1.   

    tnsname配置的sid问题啊
    错误不是都提示了么
      

  2.   


    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor C:>tnsping ORCL  
    通吗?在客户端重配一下监听看看。 顺便检查下服务端Listener启动没有。。
    ------------------------------------------------------------------------------ 
    Blog: http://blog.csdn.net/tianlesoftware 
    网上资源: http://tianlesoftware.download.csdn.net 
    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx 
    Q Q 群:62697716
      

  3.   

    可能是数据库上当前的连接数目已经超过了它能够处理的最大值select count(*) from v$process --当前的连接数 
    select value from v$parameter where name='processes' --数据库允许的最大连接数 修改最大连接数: 
    alter system set processes=300 scope=spfile; 重启数据库: 
    shutdown immediate; 
    startup; 建议让数据库管理员帮你看看