JDBC连接集群数据库的方法
程序员文章站
2022-10-13 21:20:03
在连接数据库的url地址有点不一样复制代码 代码如下:jdbc:oracle:thin:@(description=(load_balance=on)(address_li...
在连接数据库的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
上一篇: 吃什么利尿效果好食物大推荐
下一篇: JS正则表达式封装与使用操作示例