首页 > Linux操作系统 > Linux操作系统 > JDBC 如何配置RAC 的Load Balance ?

JDBC 如何配置RAC 的Load Balance ?

原创 Linux操作系统 作者:tolywang 时间:2009-05-21 11:22:08 0 删除 编辑

How to Implement Load Balancing With RAC Configured System Using JDBC

Doc ID: 247135.1



This document discusses how to implement load balancing from a JDBC application
that connects to a RAC configured system.


This material is intended for developers or analysts.

How to Implement Load Balancing With RAC Configured System Using JDBC
Here are the steps to follow in configuring load balancing and connecting
with a JDBC program:

1.  Verify that from the same system that you are running your JDBC program that
load balancing is working from sqlplus.

If you do not have sqlplus on the same system that you will be running your
JDBC program from, download the "Instant Client" that contains sqlplus from :

Here are some notes that will help you get the setup working:

Note 226880.1 Configuration of Load Balancing and Transparent Application Failover
Note 263599.1 Understanding and Troubleshooting Instance Load Balancing
Note 69010.1 Client Load Balancing and Failover Using Description and Address_List

The following note provides a script. for automating the testing of load
balancing from sqlplus (just ignore the oc4j references):

Note 388448.1 How to setup Fast Connection Failover within OAS 10.1.3 oc4j instances

Use your connect string if you use this script.

2. Now modify the connection string (host:port:sid) in your JDBC program
with the full name-value pair syntax as used in step (1) ...

        (ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))

        (ADDRESS=(PROTOCOL=TCP)(HOST=cluster_alias) (PORT=1521))

conn = DriverManager.getConnection(url, user_name, password);

You can use the TestFailover program in the following note:

Note 213412.1 How to Implement Connect Failover Using JDBC Thin

with your connect string as a starting example.


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。


  • 博文量
  • 访问量