<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style title="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body ocsi="x">
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">
<div dir="ltr"><font size="2" face="tahoma">I have searched and searched to try and find the answer to my problem before bothering anyone else, but I am stuck.
</font>I am uncertain if this should go to FreeTDS or UnixODBC, so I am sending it to both.</font></div>
</div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">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.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">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.
</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">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:</font></div>
<div dir="ltr"><font size="2" face="tahoma"><font face="tahoma">* 2.2.14 unixODBC + 0.82 FreeTDS</font></font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">* 2.2.14 unixODBC + 0.64 FreeTDS</font></div>
<div dir="ltr"><font size="2" face="tahoma">* 2.2.11 unixODBC + 0.82 FreeTDS</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">Informational bits:</font></div>
<div dir="ltr"><font size="2" face="tahoma">* 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.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">* 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.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">* 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. </font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma"><font face="tahoma">* </font>Tcpdump shows that packets are being exchanged on the correct port.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">* isql fails (error is the same as osql error included below).</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">* 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).</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">* Enabling dump for FreeTDS didn't really add any more clarification for what might be wrong.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">OSQL Output:</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">osql -S portfoliocenter -U cam -P XXXXX<br>
checking shared odbc libraries linked to isql for default directories...<br>
strings: '': No such file<br>
trying /tmp ... no<br>
trying /sql ... no<br>
trying /tmp ... no<br>
trying /sql ... no<br>
trying /usr ... no<br>
trying /loc ... no<br>
trying /tmp/sql.log ... no<br>
trying /home ... no<br>
trying /.odbc.ini ... no<br>
trying /usr/local/etc ... OK<br>
checking odbc.ini files<br>
reading /root/.odbc.ini<br>
[portfoliocenter] found in /root/.odbc.ini<br>
found this section:<br>
[portfoliocenter]<br>
Driver = FreeTDS<br>
Description = Portolio Center Database<br>
Trace = Yes<br>
Server = PORTFOLIOCENTER<br>
Port = 1433<br>
Database = PortfolioCenter<br>
UID = cam<br>
PWD = LogVol01</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">looking for driver for DSN [portfoliocenter] in /root/.odbc.ini<br>
found driver line: " Driver = FreeTDS"<br>
driver "FreeTDS" found for [portfoliocenter] in .odbc.ini<br>
found driver named "FreeTDS"<br>
"FreeTDS" is not an executable file<br>
looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini<br>
found driver line: " Driver = /usr/lib/libtdsodbc.so"<br>
found driver /usr/lib/libtdsodbc.so for [FreeTDS] in odbcinst.ini<br>
/usr/lib/libtdsodbc.so is an executable file<br>
"Server" found, not using freetds.conf<br>
Server is "PORTFOLIOCENTER"</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">Configuration looks OK. Connection details:</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"> DSN: portfoliocenter<br>
odbc.ini: /root/.odbc.ini<br>
Driver: /usr/lib/libtdsodbc.so<br>
Server hostname: PORTFOLIOCENTER<br>
Address: 10.1.1.62</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">Attempting connection as cam ...<br>
+ isql portfoliocenter cam XXXXXX -v<br>
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source<br>
[28000][unixODBC][FreeTDS][SQL Server]Login incorrect.<br>
[08S01][unixODBC][FreeTDS][SQL Server]Read from SQL server failed.<br>
[ISQL]ERROR: Could not SQLConnect<br>
net.c:168:FAILED Connecting to 10.1.1.62 port 1433.<br>
</font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"><font face="tahoma"></font></font> </div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"><font face="tahoma">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.</font></font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"><font face="tahoma"></font></font> </div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"><font face="tahoma">Any help would be appreciated!</font></font></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"> </div>
</font>
</body>
</html>