一旦有人认为你混得不错,你就必须得混好。很多情况下,人真的不是为自己而活。
在连接数据库的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
本文JDBC连接集群数据库的方法到此结束。江无回头浪,人无再少年。年华若虚度,老来恨不浅。时光容易逝,岁月莫消遣。碌碌而无为,生命不值钱。小编再次感谢大家对我们的支持!