Skip to Content.
Sympa Menu

freetds - [freetds] UnixODBC -> FreeTDS -> MSSQL login failure ...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Donovan Allen <allend AT puresimple.org>
  • To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>, "unixodbc-support AT mailman.unixodbc.org" <unixodbc-support AT mailman.unixodbc.org>
  • Subject: [freetds] UnixODBC -> FreeTDS -> MSSQL login failure ...
  • Date: Sun, 18 Apr 2010 18:09:21 -0700

I have searched and searched to try and find the answer to my problem before
bothering anyone else, but I am stuck. I am uncertain if this should go to
FreeTDS or UnixODBC, so I am sending it to both.

Both were working originally to talk to several MSSQL servers of various
versions. These were CentOS rpms of 0.64 freetDS and UnixODBC 2.2.11.

However, there seemed to be some strange problems with certain data types
and/or character sets. Since both FreeTDS and UnixODBC were both older
versions, I figured I would first just upgrade everything.

Now, since compiling new versions, I cannot connect (error messages below) to
any MSSQL database with UnixODBC->FreeTDS. I also tried combinations of
version, all of which fail besides installing the older versions from YUM, so
any combination of the following does not work:
* 2.2.14 unixODBC + 0.82 FreeTDS
* 2.2.14 unixODBC + 0.64 FreeTDS
* 2.2.11 unixODBC + 0.82 FreeTDS

Informational bits:
* All of the config files in use worked with the 2.2.11/0.62 combo. I know
for a fact that there is nothing wrong with my login credentials.

* tsql works fine! So, I know that FreeTDS is fundamentally working. Using
exactly the same credentials, I am able to use the -H flag to connect to any
of the systems. (I am not using the freetds.conf, but rather the
odbc/odbcinst combo for config) ... which is why I am not sure that FreeTDS
is to blame, versus how unixODBC is passing data to it.

* Between version combinations, the error output varies slightly, but the
problem seems to be the same ... when unixODBC hands off the request to
freeTDS, some piece of information is not getting passed correctly and the
login fails.

* Tcpdump shows that packets are being exchanged on the correct port.

* isql fails (error is the same as osql error included below).

* osql shows that my chain of configuration files is being parsed the way I
want successfully (and worked as is with the 2.2.11 unixODBC/0.64 FreeTDS
combo).

* Enabling dump for FreeTDS didn't really add any more clarification for what
might be wrong.

OSQL Output:

osql -S portfoliocenter -U cam -P XXXXX
checking shared odbc libraries linked to isql for default directories...
strings: '': No such file
trying /tmp ... no
trying /sql ... no
trying /tmp ... no
trying /sql ... no
trying /usr ... no
trying /loc ... no
trying /tmp/sql.log ... no
trying /home ... no
trying /.odbc.ini ... no
trying /usr/local/etc ... OK
checking odbc.ini files
reading /root/.odbc.ini
[portfoliocenter] found in /root/.odbc.ini
found this section:
[portfoliocenter]
Driver = FreeTDS
Description = Portolio Center Database
Trace = Yes
Server = PORTFOLIOCENTER
Port = 1433
Database = PortfolioCenter
UID = cam
PWD = LogVol01
looking for driver for DSN [portfoliocenter] in /root/.odbc.ini
found driver line: " Driver = FreeTDS"
driver "FreeTDS" found for [portfoliocenter] in .odbc.ini
found driver named "FreeTDS"
"FreeTDS" is not an executable file
looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini
found driver line: " Driver = /usr/lib/libtdsodbc.so"
found driver /usr/lib/libtdsodbc.so for [FreeTDS] in odbcinst.ini
/usr/lib/libtdsodbc.so is an executable file
"Server" found, not using freetds.conf
Server is "PORTFOLIOCENTER"
Configuration looks OK. Connection details:
DSN: portfoliocenter
odbc.ini: /root/.odbc.ini
Driver: /usr/lib/libtdsodbc.so
Server hostname: PORTFOLIOCENTER
Address: 10.1.1.62
Attempting connection as cam ...
+ isql portfoliocenter cam XXXXXX -v
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[28000][unixODBC][FreeTDS][SQL Server]Login incorrect.
[08S01][unixODBC][FreeTDS][SQL Server]Read from SQL server failed.
[ISQL]ERROR: Could not SQLConnect
net.c:168:FAILED Connecting to 10.1.1.62 port 1433.

I am pretty convinced that this is a unixODBC <-> FreeTDS data exchange
problem, and that the "login incorrect" message is a red herring ... of sorts.

Any help would be appreciated!




  • [freetds] UnixODBC -> FreeTDS -> MSSQL login failure ..., Donovan Allen, 04/18/2010

Archive powered by MHonArc 2.6.24.

Top of Page