ODBC config/connection string for Oracle RAC [message #426778] |
Mon, 19 October 2009 10:21 |
zaff
Messages: 50 Registered: July 2008
|
Member |
|
|
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
|
|
|
|
|
Re: ODBC config/connection string for Oracle RAC [message #426795 is a reply to message #426793] |
Mon, 19 October 2009 12:17 |
TallTed
Messages: 2 Registered: October 2009 Location: Burlington, MA, USA
|
Junior Member |
|
|
If your ODBC DSN is also named MIDB, yes.
Important note --
For Load Balancing and Connection Failover, your setup will probably work fine.
However, please note that TAF (Transparent Application Failover) isn't really transparent, from an application-developer's perspective, and thus, may not be part of what you get here. I'm pretty sure that neither DBD::Oracle or DBD::ODBC handle all necessary aspects of TAF.
In other words -- proceed with caution.
Be seeing you,
Ted
|
|
|