Home > Database > Mysql Tutorial > JDBC连接集群数据库

JDBC连接集群数据库

WBOY
Release: 2016-06-07 15:35:49
Original
1426 people have browsed it

在连接数据库的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:o

在连接数据库的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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template