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)))" ;
posted @ 2011-08-06 16:37  【小洲】  阅读(877)  评论(0编辑  收藏  举报