Home » Open Source » Programming Interfaces » ODBC config/connection string for Oracle RAC (Application: Perl on RHEL, Database: Oracle10g on Solaris )
ODBC config/connection string for Oracle RAC [message #426778] Mon, 19 October 2009 10:21 Go to previous message
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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: vb6 and Oracle 8.16 / 11g different results
Next Topic: Oracle 10.2 Startup /Shutdown via JDBC
Goto Forum:
  


Current Time: Sat Apr 20 04:11:44 CDT 2024