欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Java连接oracle数据--数据库在改为集群之后URL的相应调整 博客分类: oracle OracleJavaJDBC 

程序员文章站 2024-03-07 11:29:15
...

Java连接URL变更方式如下:

原方式:

jdbc.url=jdbc:oracle:thin:@111.117.12.1:1521:test
 

改为集群后的方式:

 

jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =111.117.12.1)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST =111.117.12.2)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST =111.117.12.3)(PORT = 1521))(LOAD_BALANCE=yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = test)))
 
相关标签: Oracle Java JDBC