1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

RAC tnsnames.ora

Discussion in 'Server Administration and Options' started by asp02, May 6, 2014.

  1. asp02

    asp02 Guest

    Hello. I have 2 nodes of 11.2.0.3 oracle RAC and oracle client 11.1.0 (not 11.2.0 version because EMC Documentum support 11.1.0).
    at folder network/admin i have only sqlnet and tnsnames files.

    I used search and google too, but I can't completly understand how to configure tnsnames.ora

    My task is to minimize downtime if one of the nodes fails


    tnsnames.ora where EMC Documentum installed:
    Code (Text):
    DOCU11 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))
        (LOAD_BALANCE = yes)
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = docu11)
        )
      )


    LISTENERS_DOCU11 =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.*.102)(PORT = 1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.*.101)(PORT = 1521))
      )

    DOCU111 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.*.102)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = docu11)
          (INSTANCE_NAME = docu111)
        )
      )

    DOCU112 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.*.101)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = docu11)
          (INSTANCE_NAME = docu112)
        )
      )

    ____________________


    cs-rac-test2:~/bin$ echo $ORACLE_SID
    docu11

     
    sqlnet

    Code (Text):
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    ADR_BASE =/u01/oracle

    DNS:

    Code (Text):
    rac2-n1         IN      A 10.*.*.97
    rac2-n2         IN      A 10.*.*.99
    rac1-priv       IN      A 192.168.220.1
    rac2-priv       IN      A 192.168.220.2
    rac1-vip        IN      A 10.*.*.101
    rac2-vip        IN      A 10.*.*.102
    rac-scan        IN      A 10.*.*.103
    rac-scan        IN      A 10.*.*.104



    Do I need to paste string (FAILOVER=ON) and some prererences for failover?


    And one more question.

    What is correct string if I want to use thin client?

    Code (Text):
    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.*.*.102)(PORT = 1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.*.*.101)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=docu11)))
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,345
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    To do what you want you need to have both addresses in the ADDRESS_LIST section; optionally you can set LOAD_BALANCE to ON to 'even out' the connection load between the two servers:


    Code ( (Unknown Language)):

    MYDB =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myserver01)(PORT = 1523))
          (ADDRESS = (PROTOCOL = TCP)(HOST = myserver02)(PORT = 1523))
          (LOAD_BALANCE = yes)
        )
        (CONNECT_DATA =
          (SERVICE_NAME = mydb)
        )
      )
     

    This is for a 'traditional' listener configuration; you ARE on RAC so you should also have the SCAN listener. Using SCAN you don't need to do anything to ensure a connection can be made as the SCAN listener will do that for you:


    Code ( (Unknown Language)):

    MYDB =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myserv-scan)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = mydb)
        )
      )
     

    You don't want to configure a FAILOVER address for RAC -- you want all nodes available and able to take connections. Using load balancing is a better option.