This discussion is archived
5 Replies Latest reply: Jun 14, 2012 3:21 AM by orabackus RSS

Sessions on a RAC database

Neo-b Newbie
Currently Being Moderated
Hello All,

I am using Oracle RAC 11gR2.

I have a two node database, RAC1 and RAC2.
If I have 50 sessions connected to RAC1 and 50 sessions connected to RAC2.
If for a reason RAC2 crashed, will the 50 sessions connected to RAC2 be moved to RAC1? dynamically ?

If yes how can I test this scenario. I tried to shutdown instance RAC2 but sessions were lost, I think since it was a normal shutdown.


Regards,
  • 1. Re: Sessions on a RAC database
    FountainHead Newbie
    Currently Being Moderated
    As of 11.2 , only SELECT will failover.

    So, out of 50 sessions in instance2 , all those that were doing DML will be lost and all SELECTs will resume running through instance1
  • 2. Re: Sessions on a RAC database
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,

    You must understand TAF. So, In first place read it:
    http://docs.oracle.com/cd/E11882_01/rac.112/e16795/hafeats.htm#RACAD8268

    After read above see it:

    Use Transparent Application Failover (TAF) with SELECT statements
    http://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:4947,29

    When you want see examples, always try find it on Oracle By Example (OBE).
    http://www.oracle.com/technetwork/tutorials/index.html

    Regards,
    Levi Pereira
  • 3. Re: Sessions on a RAC database
    KuljeetPalSingh Guru
    Currently Being Moderated
    Appear TAF is not properly configure on system.
    if its configure you may get below value in v$session view on FAILOVER_TYPE,FAILOVER_METHOD column .
    SQL> select username,FAILOVER_TYPE,FAILOVER_METHOD,FAILED_OVER from v$session;
    
    USERNAME                      | FAILOVER_TYPE| FAILOVER_M| FAI
    ------------------------------| -------------| ----------| ---
    ADMIN                       | SELECT       | BASIC     | NO
    ADMIN                       | SELECT       | BASIC     | NO
    ADMIN                       | SELECT       | BASIC     | NO
    ADMIN                       | SELECT       | BASIC     | NO
    ADMIN                       | SELECT       | BASIC     | NO
    ADMIN                       | SELECT       | BASIC     | NO
  • 4. Re: Sessions on a RAC database
    DBsync Newbie
    Currently Being Moderated
    hi,

    Make sure that your tns entry contains failover parameter,like FAILOVER = ON or YES.if it so no issue if it is not so change the parameter and shutdown one instance then repeat your test.
  • 5. Re: Sessions on a RAC database
    orabackus Newbie
    Currently Being Moderated
    As others have said - to accomplish what you want to achieve you need to configure TAF (Transparent Application Failover) or your application needs to notice that the connected node has died and to reconnect. We have an application that uses XA, and hence cant use TAF so the Application has to do the reconnect itself.

    There's some good notes on TAF on My Oracle Support, ie

    10g & 11g :Configuration of TAF(Transparent Application Failover) and Load Balancing [ID 453293.1]

    We use service side TAF and load balancing which works pretty well.

    regards,
    Mark

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points