Direct Connection to a RAC server

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Direct Connection to a RAC server

Post by jjeffman » Thu 22 Dec 2016 14:23

Hello,

I have a RAC Oracle server which can be connected using Oracle client and the following TNS entry:

Code: Select all

ENTRY1.WORLD,ENTRY1=
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = server2-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = server3-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORASRVC )
        (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)
      )
    )
)
There are workstations which do not have Oracle client and there is no intention of install it, so I need to use direct connection to connect to a RAC Oracle service. How can I configure a Direct connection, which are the TOraSession parameters values ?

HOST=
PORT=1521
SERVER=SN?SID?

Does the connection works if server1-vip is a DNS name ?

Thank you very much.

Jayme Jeffman

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Direct Connection to a RAC server

Post by MaximG » Fri 23 Dec 2016 08:26

ODAC supports Oracle RAC in Direct Mode. For example :

Code: Select all

 OraSession.Server := 'server1-vip,server2-vip,server3-vip:1521:ORASRVC';  
The Server value may contain one Oracle node in RAC or a list of nodes (server1-vip, server2-vip, server3-vip). Thus, ODAC will connect to the first available server listed in this property.

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: Direct Connection to a RAC server

Post by jjeffman » Fri 23 Dec 2016 11:07

Maxim, thank you very much for answering me.

I am not familiar with Oracle RAC configuration, so I wonder if I can have the same structure on the 'Port' parameter like 1521,1525,1534 :

Code: Select all

     OraSession.Server := 'server1-vip,server2-vip,server3-vip:1521,1525,1534:ORASRVC';  
Best regards.

Jayme Jeffman

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: Direct Connection to a RAC server

Post by jjeffman » Mon 26 Dec 2016 14:29

Hello Maxim,

Never mind, I have tryied to make a connection using multiple (same) ports and it works fine, so I guess it will work if each host has a different port for the Oracle listener. The Oracle SID or SN must be unique, though.

Best regards,

Jayme Jeffman

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Direct Connection to a RAC server

Post by MaximG » Wed 28 Dec 2016 11:37

We are glad that you found a necessary solution. Please don't hesitate to contact us with questions concerning ODAC usage.

Post Reply