Skip to Content.
Sympa Menu

freetds - RE: [freetds] Tsql hangs during login

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Tsql hangs during login
  • Date: Wed, 22 Dec 2004 10:39:15 -0500

> From: Flickema, Drew W.
> Sent: Tuesday, December 21, 2004 7:53 PM
>
> I am running stable version 0.62.4 on Debian (woody). I have the
> unixODBC and unixODBC-dev packages installed. I am attempting to
> connect to SQLserver 8.0
>
> >From the {prefix}/bin directory I run tsql as
> ./tsql -H db -p 445 -U sa
>
> Here is the output
>
> locale is "C"
> locale charset is "ANSI_X3.4-1968"
> Password:
>
> And it hangs here forever after typing the correct
password.....finally
> will timeout and yield
>
> Msg 20004, Level 9, State 0, Server OpenClient, Line 0
> Read from SQL server failed.
> Msg 20014, Level 9, State 0, Server OpenClient, Line 0
> Login incorrect.
> There was a problem connecting to the server

When you use "tsql -H", you bypass freetds.conf. The library then has
no indication of what version of the TDS protocol to use for that
server, and falls back to the compiled-in default. That default
(because you didn't set another, as a configure option) is TDS 5.0.
Microsoft servers do not TDS 5.0 speak.

How the server responds to a (by its lights) malformed login packet
varies. I guess in the case of SQL Server 2000, it simply doesn't
respond, not even closing the connection. That would explain the delay
and timeout.

The best and simplest answer is to create a proper freetds.conf entry.
Alternatively, you could set the TDSVER environment variable.

I suppose eventually we should add a [-t tdsver] option to tsql.
Pending that, the user guide could be clearer on the point.

HTH.

--jkl






-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to
inform and update our clients, prospects and consultants of developments
relating to our services and products, would not like to receive further
e-mail correspondence from the sender, please "reply" to the sender
indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.






Archive powered by MHonArc 2.6.24.

Top of Page