Oracle Io 异常: The Network Adapter could not establish the connection 解决
来源:互联网 发布:php书籍推荐 知乎 编辑:程序博客网 时间:2024/05/29 19:43
http://www.iteye.com/problems/47907 谢谢这位大哥-------------未解(win7下)
Exception;如下:
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.xwl.oracle.db.util.OracleConnection.main(OracleConnection.java:25)
解决代码:
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String addrRAC = "(ADDRESS=(PROTOCOL=TCP)(HOST =10.0.5.62)(PORT =1521))(ADDRESS=(PROTOCOL=TCP)(HOST =10.0.5.60)(PORT =1521))";String url = "jdbc:oracle:thin:@" + "(DESCRIPTION="
+ "(ADDRESS_LIST=" + addrRAC + ")" + "(CONNECT_DATA="
+ "(SERVER=DEDICATED)" + "(SERVICE_NAME=racdbs)" + ")"
+ ")";
Connection oracn = DriverManager.getConnection(url, "system","qz123456");
我的正确代码:
String addrRAC = "(ADDRESS=(PROTOCOL=TCP)(HOST =192.168.1.100)(PORT =1521))(ADDRESS=(PROTOCOL=TCP)(HOST =192.168.1.100)(PORT =1521))";
String url = "jdbc:oracle:thin:@" + "(DESCRIPTION="
+ "(ADDRESS_LIST=" + addrRAC + ")" + "(CONNECT_DATA="
+ "(SERVER=DEDICATED)" + "(SERVICE_NAME=orcl_xwl)" + ")"
+ ")";
- Oracle Io 异常: The Network Adapter could not establish the connection 解决
- 解决【oracle】 IO 异常:The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 函数传递参数为整形变量
- 到底什么是产品经理?
- LINK : fatal error LNK1168: cannot open ../XTEDVR/Debug/test.exe for writing
- unix编程艺术学习笔记12-关于优化时机和技法
- 用Java代码download网页
- Oracle Io 异常: The Network Adapter could not establish the connection 解决
- 10种方法解析LOGO设计中的中文字体设计
- 用Flex开发移动应用(1)---- 创建一个新的Mobile工程
- 2011 网易公司笔试题
- SUSE+linux+10绑定裸设备
- 怎样才能成为一个优秀的产品经理?
- python中cursor操作数据库
- 1 数字和字母8位密码破解程序
- Linux 下firefox手动升级