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: "Michael Starling" <mike AT barkingdogstudios.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 16:51:42 -0500

Thanks for the reply...

> TDS is a tcp protocol.
> ...
> You need only one port, and connections are always and only formed by
> the client connecting to the server. Unlike FTP, it uses only one
> channel: the server does not make an inbound connection.

Okay, thanks for confirming that for me.

> One of two things is happening:
> 1. Whatever's answering you on port 4000 isn't Sybase. When you
> connect to it, it drops the connection because your login packet tastes
> bad.
> 2. Sybase answers, but something prevents its reponse from reaching
> you.

Hmmm... the database hosting company says they have other clients connecting
to it, so I'm reasonably certain it's Sybase. But perhaps it's something
else in the way...

> That assumes, as your original message showed, that you're using the TDS
> 5.0 protocol, which you can verify that with TDSDUMP. Here I try to
> connect to my X server (which is listening but doesn't understand TDS!):
> ...

I did the same thing and the dump looks similar. I noticed you got the
#20004 (Read failed), as I did... although sometimes I got #20006 (Write
failed) on a few attempts. I guess that's basically the same issue.

Would TDS 5.0 be incompatible with some flavours of Sybase (they said it's
"ASA 8")...? I see in the FAQs that the current version supports 4.2, 5.0,
7.0, and 8.0 - and can connect to any Sybase (or Microsoft) server - but
would I have to change the protocol version used?

(I did try the tsql test after setting the $TDSVER value to "7.0", "8.0",
etc., but got basically the same results...).

Alright then - I'll have to contact them again and see what they can tell me
about the server setup. Maybe there's some weird port-forwarding thing
going on in the firewall that they overlooked. :P (so it looks like I'm
using 4000, but is actually trying to connect to their server on a different
one?)...

Thanks again! :)
Mike.


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.2/170 - Release Date: 11/15/2005






Archive powered by MHonArc 2.6.24.

Top of Page