Discussion:
[freetds] Debugging connection to mssql
Evan Panagiotopoulos
2012-10-13 01:38:42 UTC
Permalink
I am using a freebsd server trying to connect to a mssql server.

I issue:

tsql -H KCSD-ZONE-INT -p 1433 -U osdadmin
locale is "C"
locale charset is "US-ASCII"
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

Then I try:

tsql -S KCSD-ZONE-INT -U osdadmin
locale is "C"
locale charset is "US-ASCII"
Password:
Msg 20009, Level 9, State 0, Server OpenClient, Line 0
Server is unavailable or does not exist.
There was a problem connecting to the server
From past attempts the remote server admin said that he saw the following
error:
The login packet used to open the connection is structurally invalid; the
connection has been closed. Please contact the vendor of the client
library. [CLIENT: 10.1.1.65]

I went to /usr/ports/databases/freetds and reinstalled the package. I also
restarted php and lighttpd.

in /usr/local/etc/freetds there is a interfaces.dist file where I have:
KCSD-ZONE-INT
query tcp 4.2 10.1.1.16 1433

There are other sections there but I didn't touch them.

Do you have any suggestions? How can I connect to the mssql server?
James K. Lowden
2012-10-13 17:12:50 UTC
Permalink
On Fri, 12 Oct 2012 21:38:42 -0400
From past attempts the remote server admin said that he saw the
The login packet used to open the connection is structurally invalid;
the connection has been closed.
Sounds like you're not using TDS version 7.0 or above. You can confirm
that with TDSDUMP and enforce it with freetds.conf or TDSVER.

HTH.

--jkl

Loading...