Skip to Content.
Sympa Menu

freetds - [freetds] connecting to two databases with the same name but on different servers

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Chris Brookes" <cbrookes AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] connecting to two databases with the same name but on different servers
  • Date: Thu, 19 Jul 2007 15:11:40 -0500

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




Archive powered by MHonArc 2.6.24.

Top of Page