Wednesday, December 26, 2007

JDBC connection to Oracle RAC 10g

  • Make sure that the url is used as follows:
static final String dbUri = "jdbc:oracle:thin:@"
+"(DESCRIPTION=(LOAD_BALANCE=on)"
+"(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dbHost1*)"
+"(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=dbHost2*)"
+"(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=serviceName))";

*replace these with your own database configuration
  • The driver class that needs to be in palce is:
oracle.jdbc.OracleDriver
  • Get classes14.jar (JDBC Driver) from this link:


I tested this on Websphere Application Server v6 with RAD7 and it worked fine.

No comments: