JDBC连接集群数据库的方法
JDBC连接集群数据库的方法
发布时间:2016-12-28 来源:查字典编辑
摘要:在连接数据库的url地址有点不一样复制代码代码如下:jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE...

在连接数据库的url地址有点不一样

复制代码 代码如下:

jdbc:oracle:thin:@(DESCRIPTION=

(LOAD_BALANCE=on)

(ADDRESS_LIST=

(ADDRESS=(PROTOCOL=TCP)(HOST=IP1)(PORT=1521))

(ADDRESS=(PROTOCOL=TCP)(HOST=IP2)(PORT=1521))

)

(CONNECT_DATA=(SERVICE_NAME=服务名)))

url=jdbc:oracle:thin:@(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.77)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.91)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = hostIp3)(PORT = 1521))

)

(CONNECT_DATA =(SERVICE_NAME = APPDB)))

username=imei_app

password=imei_app

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Oracle教程学习
热门Oracle教程学习
编程开发子分类