Attack to a specific node in a RAC (jdbc connection)

  • From: Oliver <ofabelo@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 10 Mar 2010 13:21:40 +0000

Hello,
I have a Oracle RAC, with 2 nodes (Oracle 9i under AIX). Is it possible that
in a jdbc connection (an application under Apache Tomcat) I can choose the
primary server where it may connect? I have in the jdbc connection:

"jdbc:oracle:thin:@
(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP)(HOST=10.xxx.xx.x1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.xxx.xx.x2)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxx)))"

I have the same in my tnsnames.ora. If I put x2 before than x1, it uses the
x1 again ... I want that it connects to x2 firstly, and if it fails, it uses
x1 ...
I'm sorry for my bad english :-) Thanks beforehand.

Cheers...

Other related posts: