Skip to Content.
Sympa Menu

freetds - Re: [freetds] Can no longer connect (by tsql or PHP) - "Msg 20004, Read from SQL server failed"?

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] Can no longer connect (by tsql or PHP) - "Msg 20004, Read from SQL server failed"?
  • Date: Tue, 15 Nov 2005 13:39:23 -0500

> From: Michael Starling
> Sent: Tuesday, November 15, 2005 11:39 AM
>
> We have an old website that connects to a Sybase server using
> FreeTDS. Recently, the company hosting the database switched
> servers (and port), necessitating a change to the configuration
> files.
...

> [root@www ctt]# telnet {domain-name} 4000
> Trying {IP-address}...
> Connected to {domain-name}.
> Escape character is '^]'.
> Connection closed by foreign host.

That's bad. Normally you need to disconnnect yourself by typing ^] and
'quit' at the prompt.

> [root@www ctt]# tsql -C
...
> TDS version: 5.0

Good.

> [root@www ctt]# tsql -H {domain-name} -p 4000 -U {username}
> locale is "en_US"
> locale charset is "ISO-8859-1"
> Password: {password}
> Msg 20004, Level 9, State 0, Server OpenClient, Line 0
> -> Read from SQL server failed.

Yup, that's bad, consistent your telnet experience.

> Msg 20014, Level 9, State 0, Server OpenClient, Line 0
> Login incorrect.

(That's a spurious error message. We'll fix it one day.)

> They say the new server is the same version and configuration as
> the one that was working before (except with the different port),
> but I can't be certain, since there definitely seems to be something
> amiss.

I don't think it's the server configuration. Something's up with the
network; I suspect the firewall.

If you had a login problem, tsql would show you the message returned by
the server, e.g.:

Msg 18456, Level 14, State 1, Server , Line 0
Login failed for user 'Einstein'.

As it is, you're unable to read anything from the server, although you
can connect to it.

HTH.

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential 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