Re: SQL Server version and TDS Version

Vinh Nguyen <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
> A TDSDUMP log would probably show what we need to know.  I'd keep a close
eye on iconv(3) and client encoding issues.

Sure, here is a TDSDUMP when I specify TDS version 8:

log.c:190:Starting log file for FreeTDS 0.82
        on 2010-04-18 12:42:52 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "utf-8" character set
iconv.c:432:tds_iconv_info_init: client charset name "" unrecognized
net.c:210:Connecting to CENSORED port 1433 (TDS version 8.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:735:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
util.c:334:tdserror(0x1002001d0, 0x1002007c0, 20017, 0)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
util.c:162:Changed query state from IDLE to DEAD
token.c:316:looking for login token, got  0()
token.c:108:tds_process_default_tokens() marker is 0()
token.c:111:leaving tds_process_default_tokens() connection dead
util.c:334:tdserror(0x1002001d0, 0x1002007c0, 20002, 0)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
mem.c:563:tds_free_all_results()


and for v4.2 that works:

log.c:190:Starting log file for FreeTDS 0.82
        on 2010-04-18 12:43:43 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "utf-8" character set
iconv.c:432:tds_iconv_info_init: client charset name "" unrecognized
net.c:210:Connecting to CENSORED port 1433 (TDS version 4.2)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
net.c:779:Sending packet

REMOVED

token.c:312:tds_process_login_tokens()
net.c:592:Received header
0000 04 01 00 98 00 37 01 00-                        |.....7..|

net.c:671:Received packet
0000 e3 0f 00 01 06 6d 61 73-74 65 72 06 6d 61 73 74 |<E3>....mas ter.mast|
0010 65 72 ab 37 00 45 16 00-00 02 00 25 00 43 68 61 |er<AB>7.E.. ...%.Cha|
0020 6e 67 65 64 20 64 61 74-61 62 61 73 65 20 63 6f |nged dat abase co|
0030 6e 74 65 78 74 20 74 6f-20 27 6d 61 73 74 65 72 |ntext to  'master|
0040 27 2e 06 53 50 49 4e 41-4c 00 01 00 e3 09 00 03 |'..SPINA L...<E3>...|
0050 05 69 73 6f 5f 31 01 00-ad 20 00 01 04 02 00 00 |.iso_1.. <AD> ......|
0060 16 4d 69 63 72 6f 73 6f-66 74 20 53 51 4c 20 53 |.Microso ft SQL S|
0070 65 72 76 65 72 00 00 5f-09 00 ff e3 09 00 04 03 |erver.._ ..<FF><E3>....|
0080 35 31 32 03 35 31 32 fd-00 00 00 00 00 00 00 00 |512.512<FD> ........|

token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  ab(INFO)
token.c:108:tds_process_default_tokens() marker is ab(INFO)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2356:server indicated charset change to "iso_1"
iconv.c:985:setting server single-byte charset to "ISO-8859-1"
iconv.c:432:tds_iconv_info_init: client charset name "" unrecognized
token.c:316:looking for login token, got  ad(LOGINACK)
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
                was_cancelled = 0
                error = 0
                done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
token.c:2232:                rows_affected = 0
token.c:393:leaving tds_process_login_tokens() returning 1
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to DEAD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.