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

  • From: Bradd Piontek <piontekdd@xxxxxxxxx>
  • To: exriscer@xxxxxxxxx
  • Date: Wed, 10 Mar 2010 08:20:09 -0600

Also, remember there is something called Server-side load balancing.
Regardless of what you put in your JDBC URL or TNSNAMES.ORA, you could be
redirected to another node. The only ways I know to make sure I connect to a
specific node/instance


   1. Connect to the instance (SID=<INSTANCE_NAME>) and host <> VIP
   2. Set up services (non-standard) that run on a certain node only

Bradd Piontek


On Wed, Mar 10, 2010 at 8:06 AM, LS Cheng <exriscer@xxxxxxxxx> wrote:

> load_balance=on means turns on client load balancing which means use any of
> entries defined in your tns
>
> so if you want to ensure the first entry is always used just put
> load_balance=off
>
> Thanks
>
>
>
> On Wed, Mar 10, 2010 at 2:57 PM, Oliver <ofabelo@xxxxxxxxx> wrote:
>
>> Hello,
>> I'm sorry for top posting.
>> Ok, thank you very much, it works. I see that if I do many connections
>> with Toad to my Oracle RAC, with load_balance=on and failover=on, it always
>> attack to the first node. Is it normal? I understand that if I put the same
>> in the jdbc string (balance on and failover on), it will always attack to
>> first node, isn't it? I should delete "balance on" in all entries of jdbc
>> connections, isn't it?
>> Thanks beforehand.
>>
>> Cheers...
>>
>> 2010/3/10 LS Cheng <exriscer@xxxxxxxxx>
>>
>> If I understand correctly your question you have to put LOAD_BALANCE=OFF
>>> and x2 first
>>>
>>>
>>> Thanks
>>>
>>> --
>>> LSC
>>>
>>>
>>>
>>> On Wed, Mar 10, 2010 at 2:21 PM, Oliver <ofabelo@xxxxxxxxx> 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...
>>>>
>>>
>>>
>>
>

Other related posts: