JAVA 连接 ORACLE RAC 字符串
做个笔记
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=vip1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=vip2)(PORT=1521))(LOAD_BALANCE=yes)(FAILOVER=on))(CONNECT_DATA=(SERVICE_NAME=gs)))
String URL=
"jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=" +
"(ADDRESS=(PROTOCOL=TCP)(HOST=ip1)(PORT=1521))" +
"(ADDRESS=(PROTOCOL=TCP)(HOST=ip2)(PORT=1521))" +
"(LOAD_BALANCE=yes)(FAILOVER=on))" +
"(CONNECT_DATA=(SERVICE_NAME=orcl)))" ;