码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2015-03-04 16:20:42      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:

      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)(HOST = 192.168.0.200)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

对应:@后面接相对应的HOST,PORT,SERVICE_NAME的值

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

标签:

原文地址:http://www.cnblogs.com/xuyadong/p/4313449.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!