Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2009
    Posts
    4

    Thumbs up Unanswered: question of Oracle RAC

    Now we have installed RAC comprising of two instances.

    1. RAC1 Server:
    RACDB =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1521))
    (LOAD_BALANCE = on)
    (FAILOVER = on)
    )
    (CONNECT_DATA =
    (SERVICE_NAME = racdb)
    (failover_mode =
    (type = select)
    (method = basic)
    )
    )
    )

    RACDB1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = racdb)
    (INSTANCE_NAME = racdb1)
    )
    )

    2. RAC2 server:
    RACDB =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1521))
    (LOAD_BALANCE = on)
    (FAILOVER = on)
    )
    (CONNECT_DATA =
    (SERVICE_NAME = racdb)
    (failover_mode =
    (type = select)
    (method = basic)
    )
    )
    )

    RACDB2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = racdb)
    (INSTANCE_NAME = racdb2)
    )
    )

    3. For JNDI, according to the configuration mode of “Connect-Time Failover”, we would like to configure it as primary/second mode. E.g as below we usually use sever 101, only when 101 failed it connects to 102 automatically.

    RACDB1_FAILOVER =
    (DESCRIPTION=
    (FAILOVER=on)
    (LOAD_BALANCE=off)
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.101)(PORT=1 521))
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.102)(PORT=1 521))
    (CONNECT_DATA=
    (SERVER=DEDICATED)
    (SERVICE_NAME=RACDB)
    (failover_mode =
    (type = select)(method = basic)
    )
    )
    )

    According to the charateristic of the “Connect-Time Failover” mode as below:
    a) One service(Tries one node,then the other node)
    b) Used for failover
    c) Balance is done manually
    d) In the event of a failure(Transaction is lost;Session is lost; Reconnection occurs automatically)

    load balance should trye 101 at first,only when 101 failed it will try 102.
    But actually from the production of table sequence, it seems that still two instances are usely alternatively.

    Could anybody help to advise what is the problem? Thanks a lot in advance!

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    please rephrase the question to be a bit more clear. What are you asking?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    Duck, what we would like to configure on the JNDI, is a "Connect_time failover" mode. That is only when the first instance connection failed, it will try to connect to the second instance.
    But actually, although we configured the "Connect-Time Failover" mode on the JNDI, it still use the load_balance mode. That to say, both the two database instances are accessed alternatively. (In the sever configuration, the service "RACDB" is configured as load-balance mode)
    Is it because the JNDI is a pool connection, that although we configured the client as "Connect-Time Failover", if the server configured it as "Load-balance" mode, the client access is still a "Load-balance" mode?
    Thanks!

  4. #4
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    What is the container that is making use of this JDNI ? (.. weblogic, tomcat, etc..

    Datasources defined with JDBC doesn't support FCF/TAF natively, you will have to use OCI. With that in mind, you can remove all the FCF/TAF parameters from your connection string, leaving it to just

    RACDB1_FAILOVER =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.101)(PORT=1 521))
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.102)(PORT=1 521))
    (CONNECT_DATA=
    (SERVER=DEDICATED)
    (SERVICE_NAME=RACDB)
    )
    )

  5. #5
    Join Date
    Jul 2009
    Posts
    4
    Thanks for your reply, JMartinez!
    The container is Websphere. Actually althought I provided the FCF/TAF paramters there (set load_balance off, failover on), it still balanced the load automatically. E.g. the sequence was generated alternatively from the two servers.
    What we expected is to specify one server as the primary, only when the primary instance failed, then fail over to the other one. But actually, from the JNDI definition, it did not work as expected.

  6. #6
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Did you tried with the modified connection string I gave you above?

  7. #7
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool Primary connection only...

    Quote Originally Posted by breeze2009
    Thanks for your reply, JMartinez!
    The container is Websphere. Actually althought I provided the FCF/TAF paramters there (set load_balance off, failover on), it still balanced the load automatically. E.g. the sequence was generated alternatively from the two servers.
    What we expected is to specify one server as the primary, only when the primary instance failed, then fail over to the other one. But actually, from the JNDI definition, it did not work as expected.
    Then maybe you need to set : (LOAD_BALANCE = OFF)
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  8. #8
    Join Date
    Jul 2009
    Posts
    4
    I had set "(LOAD_BALANCE=off)", while it still does not work.

    Our setting was as below:
    jdbcracle:thin:@(DESCRIPTION= (FAILOVER=on)(LOAD_BALANCE=off)(ADDRESS=(PROTOCOL= TCP)(HOST=192.168.1.101)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.102)(PORT=1 521)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=RACD B)(failover_mode =(type = select)(method = basic))))

    Someone suggested that since we used JNDI connection pool, the setting does not work. And suggested to configure another service name in server side.

    Could someone help to advise?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •