[freetds] TSQL times out

Joel West joel at joelwest.com
Thu Aug 19 11:12:11 EDT 2004


I am using an RPM version of freetds to connect to an MS SQL databse from 
a redhat linux box:

The RPMs are:

freetds-0.62.1-1
freetds-devel-0.62.1-1
freetds-unixodbc-0.62.1-1


In the freetds.conf:

# A typical Microsoft SQL Server 7.0 configuration
[MyServer70]
         host = 192.168.100.2
         port = 1433
         tds version = 4.2


I can telnet to the server port 1433

I tried to diagnose a PERL problem with tsql:

Using tsql I get:

[root at yaknars etc]# tsql -H 192.168.100.2 -p 1433 -U ss_username
locale is "en_US"
locale charset is "ISO-8859-1"
Password:
Msg 18456, Level 14, State 1, Server , Line 0
Login failed for user 'ss_username'.
Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.
There was a problem connecting to the server

And the log file:

Starting log file for FreeTDS 0.62.1
 	on 2004-08-19 06:03:18 with debug level 99.
names for ISO-8859-1: ISO-8859-1
names for UTF-8: UTF-8
names for UCS-2LE: UCS-2LE
names for UCS-2BE: UCS-2BE
iconv to convert client-side data to the "ISO-8859-1" character set
06:03:18.881908 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
06:03:18.881955 Connecting to 192.168.100.2 port 1433, TDS 4.2.
Sending packet @ 06:03:18.882356
0000 02 00 02 00 00 00 00 00-79 61 6b 6e 61 72 73 00 |........ yaknars.|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0020 00 00 00 00 00 00 07 73-73 5f 75 73 65 72 6e 61 |.......s s_userna|
0030 6d 65 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |me...... ........|
0040 00 00 00 00 00 0b 73 73-5f 75 73 65 72 6e 61 6d |......ss _usernam|
0050 65 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |e....... ........|
0060 00 00 00 00 0b 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 02 00 |........ ........|
0090 00 00 00 00 54 53 51 4c-00 00 00 00 00 00 00 00 |....TSQL ........|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 04 31 39 32 2e 31-36 38 2e 31 30 30 2e 32 |...192.1 68.100.2|
00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 0d 73 73 5f 75 73 65-72 6e 61 6d 65 00 00 00 |..ss_use rname...|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 0b 04 02 00 00 54 44-53 2d 4c 69 62 72 61 72 |......TD S-Librar|
01e0 0a 00 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|


Sending packet @ 06:03:18.882805
0000 02 01 00 4c 00 00 00 00-00 00 00 00 00 00 0a 00 |...L.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
0020 5f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |_1...... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
0040 00 00 00 03 00 00 00 00-00 00 00 00             |........ ....|


06:03:18.882902 tds_process_login_tokens()
Received header @ 06:03:18.883449
0000 04 01 00 44 00 00 01 00-                        |...D....|


Received packet @ 06:03:18.883488
0000 aa 30 00 18 48 00 00 01-0e 24 00 4c 6f 67 69 6e |ª0..H... .$.Login|
0010 20 66 61 69 6c 65 64 20-66 6f 72 20 75 73 65 72 | failed  for user|
0020 20 27 73 73 5f 75 73 65-72 6e 61 6d 65 27 2e 00 | 'ss_use rname'..|
0030 00 00 00 fd 02 00 00 00-00 00 00 00             |...ý.... ....|


06:03:18.883560 looking for login token, got  aa(ERROR)
06:03:18.883588 tds_process_default_tokens() marker is aa(ERROR)
tds_get_string: reading 36 from wire to give 36 to client.
06:03:18.883708 looking for login token, got  fd(DONE)
06:03:18.883752 tds_process_default_tokens() marker is fd(DONE)
06:03:18.883787 tds_process_end: more_results = 0
 		was_cancelled = 0
 		error = 1
 		done_count_valid = 0
06:03:18.883825 tds_process_end() state set to TDS_IDLE
06:03:18.883849 leaving tds_process_login_tokens() returning 0
06:03:18.883959 tds_client_msg: #20014: "Login incorrect.".  Connection state is now 2.


More information about the FreeTDS mailing list