Skip to Content.
Sympa Menu

freetds - [freetds] Misinterpereting instance as part of server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Dave Schultz <dschultz AT cricketcommunications.com>
  • To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Misinterpereting instance as part of server
  • Date: Tue, 8 May 2012 12:43:29 -0600

I have a FreeTDS/odbc source that appears to be trying to resolve the server
and instance of "servername.domain\db1" as a server instead of a server
called "servername.domain"
and an instance "db1"



I know this should work because I have two linux servers using the same exact
odbc source.
Server A works.
Server B doesn't.

SERVER A:
-------------------------------------------------------
A Redhat server.
Using a data source in odbc.ini, I can connect to a particular MS SQL server
and instance with the following server name in the source definition:

Server = Servername.domain\db1

Some info from that server:

$ tsql -C
Compile-time settings (established with the "configure" script):
Version: freetds v0.64
MS db-lib source compatibility: yes
Sybase binary compatibility: unknown
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes

$ odbcinst --version
unixODBC 2.2.11


SERVER B:
-------------------------------------------------------
Debian Etch (old) server:
FreeTDS and odbcinst work perfectly Server B when accessing any of several MS
SQL servers.
I am able to connect to several MS SQL servers from this machine, but only if
they don't require an instance.

Using the exact same data source definition as Server A, I am unable to
connect to the same MS SQL server of "servername.domain\db1"

The error message is:
failed: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1)

Also, tcpdump shows that the command never leaves server B. It appears that
it is trying to resolve the server "servername.domain\db1" instead of
"servername.domain"

When I remove the instance from the server, I get a "connection refused"
error - which means I am at least reaching the MS SQL box but it doesn't do
me any good because I need the instance to connect.

It appears that the server instance (\db1) is getting interpereted as part of
the server name.

Some info from server B.

# tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.83.dev.20090814
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: no


# odbcinst --version
unixODBC 2.2.11









  • [freetds] Misinterpereting instance as part of server, Dave Schultz, 05/08/2012

Archive powered by MHonArc 2.6.24.

Top of Page