异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection

    Oracle Database Connection (from oracle.com)
    
    PROBLEM
    You are attempting to connect to an Oracle instance using JDBC and you are receiving the following error.
    java.sql.SQLException: Io exception:
    The Network Adapter could not establish connection
    SQLException: SQLState (null) vendor code (17002)
    
    Any or all of the following conditions may also apply:
    
    1) You are able to establish a SQL*Plus connection from the same
    client to the same Oracle instance.
    
    2) You are able to establish a JDBC OCI connection, but not a Thin
    connection from the same client to the same Oracle instance.
    
    3) The same JDBC application is able to connect from a different
    client to the same Oracle instance.
    
    4) The same behavior applies whether the initial JDBC connection
    string specifies a hostname or an IP address.
    
    
    
    REDISCOVERY
    To verify whether you are hitting this problem, verify whether the Oracle instance is configured for Multithreaded Server (MTS). If the Oracle instance is not configured for MTS, you are probably encountering a different problem. Otherwise, continue. Try forcing the JDBC connection to use a dedicated server instead of a shared server. This can be accomplished in several ways. For JDBC OCI or Thin, this can be done by reconfiguring the server for dedicated connections only. This approach, however, may not be feasible in many cases. In such cases, the following options apply: For JDBC OCI:
    
    1) Add the (SERVER=DEDICATED) property to the TNS connect string
    stored in the tnsnames.ora file on the client.
    
    2) Set the user_dedicated_server=ON in sqlnet.ora on the client.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值