Skip to Content.
Sympa Menu

freetds - Re: [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: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] connecting to two databases with the same name but on different servers
  • Date: Fri, 20 Jul 2007 11:06:50 -0400

Chris Brookes wrote:
> 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?

That leaves you stuck, I'm afraid. Making the local dataserver name
meaningful to the server was never a good idea. You'd have to blame
Sybase for making that field in the login packet important to the
connection, and blame FreeTDS for offering no alternative way to populate
that field.

The right thing to do would be to add a new field to the freetds.conf
section. Call it, say, "ASA dbname", and let it override the servername
field in the login request (cf. src/tds/login.c::tds_send_login).

The motivation to do this, however, is very limited. The ASA user base
isn't very big, and of them the number in your shoes -- two servers using
the same database name -- is very small. :-/ (I've been working on this
project over 5 years now, and I don't remember another query like yours.)
That said, I'd happily apply a patch.

My sense is that the kind of small deployments ASA is aimed at are
nowadays better served by the freely downloadable versions of the regular
Sybase server and Microsoft's Express product. If you don't mind my
asking, why do you use ASA instead?

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page