Skip to Content.
Sympa Menu

freetds - [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 AT lists.ibiblio.org>
  • Subject: [freetds] Can no longer connect (by tsql or PHP) - "Msg 20004, Read from SQL server failed"?
  • Date: Tue, 15 Nov 2005 11:38:59 -0500


Hello,

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.

When this happened once before, I figured out that I had to update the
"freetds.conf" file to change the host and port - and get the server admin
to open a port in the firewall. So... we did the same thing this time.

Unfortunately, the connection won't work. I was on the phone with the
database hosting company for a while trying various things, but I'm stumped.

We tried connecting manually using "tsql", and what struck me as odd was the
error message "20004: Read from SQL server failed".

Here's some details:

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

[root@www ctt]# tsql -C
locale is "en_US"
locale charset is "ISO-8859-1"
Compile-time settings (established with the "configure" script):
Version: freetds v0.62.4
MS db-lib source compatibility: no
Sybase binary compatibility: unknown
Thread safety: no
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: no


[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.
Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.
There was a problem connecting to the server

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.

Any ideas? I'd really appreciate any help you could give.
Thanks!!

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