hi guys,
We have an application written in Perl that uses ODBC to connect to a Oracle database. However, we now need this application to connect to a two-node Oracle RAC database. After doing some googling, it appears that the best way of ODBC to talk to RAC is to modify the tnsnames.ora file to refer to both nodes and the modify the ODBC connection string to refer to the tns name:
Sample tns entry:
MIDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(LOAD_BALANCE = ON)
(FAILOVER = ON)
(CONNECT_DATA =
(SERVICE_NAME = MYCLUSTER)
(failover_mode = (type=select)(method=basic))
)
)
Sample connection string:
my $dbh=DBI->connect('DBI:Oracle:MIDB','myuser','mypwd');
I would like to know if this is the best way of configuring ODBC for RAC without using any third-party add-ons.
Thanks in advance,
Zaff
[Updated on: Mon, 19 October 2009 10:48]
Report message to a moderator