邀朋友种豆,一起分享吧
喜欢购买正品行货?那就去品牌街

JDBC连接集群数据库的方法

来自:种豆 时间:2018-01-12 阅读:597次 原文链接

在连接数据库的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

 
关于种豆 ┊ 联系我们 ┊ 免责声明 ┊ 发帖须知 ┊ 请提意见 ┊ 站点地图
本站为个人爱好兴趣分享网站,不代表本人观点,如有侵权请联系QQ3371650278进行处理
sowsoy.com 版权所有 Copyright©2010-2020 浙ICP备10212932号
Email:sowsoy#hotmail.com