[freetds] connecting to two databases with the same name but on different servers
Chris Brookes
cbrookes at gmail.com
Thu Jul 19 16:11:40 EDT 2007
I'm using freetds-0.62.4 on Solaris to access a SQL Anywhere database
(ciscoworks) from perl using DBD-Sybase=1.08. It works great. My
freetds.conf entry is:
[rmengDb]
host = server.domain.com
port = 43455
tds version = 5.0
My connect string in perl:
$cw = DBI->connect("DBI:Sybase:rmengDb", $user, $passwd)
I have another Ciscoworks box that I need to access from the same
script, so I configure another entry like this:
[rmengDb2]
host = server2.domain.com
port = 43455
tds version = 5.0
But this doesn't work when I called Sybase:rmengDb2 from a connect in
perl. I think I remember reading somewhere originally that the name in
[] is used as the database to connect to? I can't have the same
definition [] twice in the freetds.conf, so where does that leave me?
It seems like there is a ;database=whatever parameter you can add to
the DBI connect string but I can't seem to get it to work.
Is there a solution for this?
Any help appreciated
Cheers
C
More information about the FreeTDS
mailing list