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

  • From: Hemant K Chitale <hkchital@xxxxxxxxxxxxxx>
  • To: ofabelo@xxxxxxxxx, oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 10 Mar 2010 22:52:33 +0800


If you specify "LOAD_BALANCE=on" you cannot control which instance the client attempts a connection to first.

Just specify "FAILOVER=on" without the LOAD_BALANCE. That way, the first connect specifer "x1" is always attempted. If "x1" is not available, the client makes an attempt to "x2". This is called Connect-Time failover.

I have had it configured such that application server "A" specifies the connectstrings as "x1" and "x2" while application server "B" specifies the connectstrings as "x2" and "x1". That way I know that "A" always attempts "x1" unless "x1" is down (and vice versa for "B").

Hemant K  Chitale
http://hemantoracledba.blogspot.com

At 09:21 PM Wednesday, Oliver wrote:
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...






--
//www.freelists.org/webpage/oracle-l


Other related posts: