freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem
- From: "Middleton, Eric" <eric.middleton AT oncologysupply.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem
- Date: Wed, 16 Jan 2008 17:55:38 -0600
Yes I would really like to try your hack but I am not sure how to apply
it. Could you tell me how to apply this file?
Thanks,
Eric Middleton
Oncology Supply Automation
Cell: 334-790-7587
-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Wednesday, January 16, 2008 5:44 PM
To: FreeTDS Development Group
Subject: Re: [freetds] Sybase ASA 9, unixODBC multiple connection
problem
Middleton, Eric wrote:
> They are Sybase version 9 and it seems in the odbc.ini that if the
> server name in the config is not the name of the actual database file
> then the connection does not work. Well this is a problem because all
> 9 servers have a database that is the same. So the only difference is
> the IP. However since the ip is in the freeTDS.conf file then I can
> only connect to the first server in the .conf file. Does anyone know
> a work around for this?
You, my friend, need a patch. Badly, eight times over. :-(
What happens: FreeTDS puts the [servername] text in the login packet, in
a field the TDS 5.0 functional spec calls "lservname". For every other
kind of TDS server, the field is a user-defined string with no inherent
meaning to the server. For ASA servers, it identifies the database.
That works as long as you don't have two servers with the same database.
Good news: You don't have two such servers Bad news: You have nine.
What's needed: a freetds.conf server attribute that overrides the above
behavior:
[fruitserver1]
...
ASA Database = bananas
and a change to src/tds/config.c to use that field instead of the
servername in the login packet.
As a quick hack, I did something simpler, attached. Apply it,
recompile, relink, reinstall. Set the environment variable
"ASA_DATABASE" to the name of your database. The login packet will use
that string instead of [servername] for lservname. If you use it,
please let me know if it works.
Setting TDSHOST might also work if you can set the environment before
each connection. The effect would be to look up the same "server" every
time, but to override the connection target, keeping the other
attributes the same, obviously. Two points for using the mailing list,
where you can snare suggestions from everyone, and a bonus for coming up
with just the kind of hack I'd never think of.
Regards,
--jkl
CONFIDENTIALITY NOTICE. This electronic mail transmission may contain
privileged and/or confidential
information and is intended only for the review of the party to whom it is
addressed. If you have
received this transmission in error, please immediately return it to the
sender, delete it and destroy
it without reading it. Unintended transmission shall not constitute the
waiver of the attorney-client
or any other privilege.
-
[freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Dann Corbit, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Dan Wierenga, 01/16/2008
- Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem, Middleton, Eric, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Dan Wierenga, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
James K. Lowden, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
James K. Lowden, 01/16/2008
- Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem, Middleton, Eric, 01/18/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
James K. Lowden, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/18/2008
-
Message not available
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
ZIGLIO, Frediano, VF-IT, 01/21/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/22/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/22/2008
- Message not available
- Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem, ZIGLIO, Frediano, VF-IT, 01/25/2008
- Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem, ZIGLIO, Frediano, VF-IT, 01/28/2008
- Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem, James K. Lowden, 01/28/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/22/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/22/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
ZIGLIO, Frediano, VF-IT, 01/21/2008
-
Message not available
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Middleton, Eric, 01/16/2008
-
Re: [freetds] Sybase ASA 9, unixODBC multiple connection problem,
Dann Corbit, 01/16/2008
Archive powered by MHonArc 2.6.24.