Hello,

Can someone help with me a DBI issue I'm having in connecting to an Oracle 10g 
DB server?

We have production scripts that loads data into DB (oracle9i) using DBI module. 
We recently migrated our database to oracle 10g. Our DBA has implemented load 
balancing on this 10g server and gave us the new tnsnames entry as... 

hoststring.10G =
  (DESCRIPTION=
    (LOAD_BALANCE=yes)
       (ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.123)(PORT=1521))
       (ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.124)(PORT=1521))
    (CONNECT_DATA=
       (SERVICE_NAME=xxxx)
    )
  )

Currently, using the DBI module I am able to connect to these servers 
(x.x.x.123 & x.x.x.124) individually using the following code...

my $db_conn_dsn = "dbi:Oracle:host=HOSTNAME;port=PORTNUMBER;sid=SID";
my $db_conn_user= "XXXXX";
my $db_conn_pass= "XXXXX";

my $dbh = DBI->connect($db_conn_dsn,$db_conn_user,$db_conn_pass,{ RaiseError => 
1, AutoCommit => 0 } );

But I want to connect to the load balanced configuration instead of connecting 
to the servers separately. Is there any way I can refer to the host string 
("hostname.10G") in tnsnames.ora file for DBI module connection information. 
Finally, I want to use the load balanced configuratin rather than connecting to 
individual servers.

Any help in this regard is greatly appreciated.

Thanks & Regards
Srinu


      

Reply via email to