JDBC 链接oracle的三种URL写法
1.普通SID方式
jdbc:oracle:thin:username/password@x.x.x.1:1521:SID
2.普通ServerName方式
jdbc:oracle:thin:username/password@//x.x.x.1:1522/ABCD
3.RAC方式
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.2)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxrac)))
---------------------
原文:https://blog.csdn.net/xlxxcc/article/details/51148188
jdbc:oracle:thin:username/password@x.x.x.1:1521:SID
2.普通ServerName方式
jdbc:oracle:thin:username/password@//x.x.x.1:1522/ABCD
3.RAC方式
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.2)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxrac)))
---------------------
原文:https://blog.csdn.net/xlxxcc/article/details/51148188
三种连接方法区别:
参考:https://blog.csdn.net/u012062455/article/details/52442838/