Skip to Content.
Sympa Menu

freetds - RE: [freetds] Sybase Incompatibilities?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Ben Vaughn" <bvaughn AT BlackbirdTech.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Sybase Incompatibilities?
  • Date: Wed, 16 Jul 2003 10:40:13 -0400

Yeah, this version of ASA requires the database name and servername to
match, or it will NOT allow a connection. With tinkering I found that
the database name sent to the server is the name you specify in the
interfaces/freetds.conf files, while the server name is part of the "app
name" specification of the sybase_connect() function of PHP. I don't
think such an option exists for SQSH/TSQL, but perhaps it would be
beneficial to include it? Also, I would not say I was the best reader
of documentation, so I am not sure whether the comments I just supplied
are documented properly. If not, I hope this helps!! Attached is a
TDSDUMP of a proper connection.

Starting log file for FreeTDS 0.62.dev.20030715
on 2003-07-15 21:50:23 with debug level 99.
Using trivial iconv from
iconv.c
names for ISO-8859-1: ISO-8859-1
names for US-ASCII: US-ASCII
names for UCS-2LE: UCS-2LE
names for UCS-2BE: (null)
iconv to convert client-side data to the "ISO-8859-1" character set
21:50:23.871526 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
21:50:23.871561 Connecting to 10.150.250.10 port 10033, TDS 5.0.
Sending packet @ 21:50:23.936611
0000 02 00 02 00 00 00 00 00-6d 61 6e 61 67 65 2e 70 |........ manage.p|
0010 69 63 6b 65 74 2d 66 65-6e 63 65 2e 6f 72 67 00 |icket-fe nce.org.|
0020 00 00 00 00 00 00 17 69-64 73 6d 64 63 00 00 00 |.......u nameu...|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 06 43 31-73 43 30 43 31 73 43 30 |......pw pwpwpwpw|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 0a 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 00 00 |........ ........|
0090 00 00 00 00 73 71 6c 63-6f 72 65 64 62 73 65 72 |....appn ameappna|
00a0 76 65 72 00 00 00 00 00-00 00 00 00 00 00 00 00 |mea..... ........|
00b0 00 00 0f 69 64 73 6d 64-63 00 00 00 00 00 00 00 |...uname u.......|
00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 06 00 0a 43 31 73 43-30 43 31 73 43 30 00 00 |....pwpw pwpwpw..|
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 0c 05 00 00 00 43 54-2d 4c 69 62 72 61 72 79 |......CT -Library|
01e0 0a 05 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 @ 21:50:23.937152
0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
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-e2 16 00 01 09 00 00 06 |........ ........|
0050 6d 7f ff ff ff fe 02 09-00 00 00 00 0a 68 00 00 |m....... .....h..|
0060 00 - |.|


21:50:23.937269 tds_process_login_tokens()
Received header @ 21:50:24.230060
0000 04 01 00 5b 00 00 00 00- |...[....|


Received packet @ 21:50:24.230107
0000 e3 09 00 03 06 63 70 31-32 35 32 00 ad 22 00 05 |.....cp1 252.."..|
0010 05 00 00 00 18 41 64 61-70 74 69 76 65 20 53 65 |.....Ada ptive Se|
0020 72 76 65 72 20 41 6e 79-77 68 65 72 65 07 00 00 |rver Any where...|
0030 00 e2 16 00 01 09 00 00-06 61 01 ff ff fe e6 02 |........ .a......|
0040 09 ff ff 00 00 0a 68 00-00 0a fd 00 00 01 00 00 |......h. ........|
0050 00 00 00 - |...|


21:50:24.230209 looking for login token, got e3(ENVCHANGE)
21:50:24.230227 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 6 from wire to give 6 to client.
21:50:24.230271 looking for login token, got ad(LOGINACK)
21:50:24.230290 looking for login token, got e2(CAPABILITY)
21:50:24.230307 tds_process_default_tokens() marker is e2(CAPABILITY)
21:50:24.230325 looking for login token, got fd(DONE)
21:50:24.230341 tds_process_default_tokens() marker is fd(DONE)
21:50:24.230359 tds_process_end() more_results = 0, was_cancelled = 0
21:50:24.230376 leaving tds_process_login_tokens() returning 1
Sending packet @ 21:50:24.230406
0000 0f 01 00 21 00 00 00 00-21 14 00 00 00 00 73 65 |...!.... !.....se|
0010 74 20 74 65 78 74 73 69-7a 65 20 36 34 35 31 32 |t textsi ze 64512|
0020 20 - | |


Received header @ 21:50:24.295110
0000 04 01 00 11 00 00 00 00- |........|


Received packet @ 21:50:24.295156
0000 fd 00 00 01 00 00 00 00-00 |........ .|


21:50:24.295185 processing result tokens. marker is fd(DONE)
21:50:24.295203 tds_process_end() more_results = 0, was_cancelled = 0
21:50:24.295221 tds_process_result_tokens() state is COMPLETED
21:50:24.295240 leaving ct_connect() returning 1
21:50:24.295258 ct_cmd_alloc()
21:50:24.295320 ct_command()
21:50:24.295339 ct_send()
Sending packet @ 21:50:24.295362
0000 0f 01 00 18 00 00 00 00-21 0b 00 00 00 00 75 73 |........ !.....us|
0010 65 20 69 64 73 6d 64 63- |e dbname|


21:50:24.295417 ct_send() succeeded
21:50:24.295433 ct_results()
Received header @ 21:50:24.360010
0000 04 01 00 11 00 00 00 00- |........|


Received packet @ 21:50:24.360056
0000 fd 00 00 01 00 00 00 00-00 |........ .|


21:50:24.360085 processing result tokens. marker is fd(DONE)
21:50:24.360103 tds_process_end() more_results = 0, was_cancelled = 0
21:50:24.360120 ct_results() process_result_tokens returned 1 (type
4052)
21:50:24.360139 ct_results()
21:50:24.360155 tds_process_result_tokens() state is COMPLETED
21:50:24.360170 ct_results() process_result_tokens returned 2 (type
4052)
21:50:24.360226 ct_command()
21:50:24.360245 ct_send()
Sending packet @ 21:50:24.360269
0000 0f 01 00 27 00 00 00 00-21 1a 00 00 00 00 53 45 |...'.... !.....SE|
0010 4c 45 43 54 20 2a 20 46-52 4f 4d 20 53 59 53 5f |LECT * F ROM SYS_|
0020 53 45 4e 53 4f 52 53 - |SENSORS|


21:50:24.360337 ct_send() succeeded
21:50:24.360354 ct_results()
Received header @ 21:50:24.437577
0000 04 00 01 fb 00 00 00 00- |........|


Received packet @ 21:50:24.437625
[proper table response data]


21:50:24.438116 processing result tokens. marker is ee(RESULT)
tds_get_string: reading 2 from wire to give 2 to client.
21:50:24.438185 processing result. type = 108(numeric), varint_size 1
21:50:24.438204 processing result. column_size 5
tds_get_string: reading 4 from wire to give 4 to client.
21:50:24.438229 processing result. type = 39(varchar), varint_size 1
21:50:24.438246 processing result. column_size 64
tds_get_string: reading 9 from wire to give 9 to client.
21:50:24.438270 processing result. type = 108(numeric), varint_size 1
21:50:24.438287 processing result. column_size 5
tds_get_string: reading 11 from wire to give 11 to client.
21:50:24.438312 processing result. type = 108(numeric), varint_size 1
21:50:24.438329 processing result. column_size 5
tds_get_string: reading 10 from wire to give 10 to client.
21:50:24.438353 processing result. type = 39(varchar), varint_size 1
21:50:24.438370 processing result. column_size 16
tds_get_string: reading 11 from wire to give 11 to client.
21:50:24.438394 processing result. type = 39(varchar), varint_size 1
21:50:24.438411 processing result. column_size 16
tds_get_string: reading 7 from wire to give 7 to client.
21:50:24.438435 processing result. type = 108(numeric), varint_size 1
21:50:24.438461 processing result. column_size 5
tds_get_string: reading 6 from wire to give 6 to client.
21:50:24.438484 processing result. type = 108(numeric), varint_size 1
21:50:24.438501 processing result. column_size 5
tds_get_string: reading 8 from wire to give 8 to client.
21:50:24.438525 processing result. type = 39(varchar), varint_size 1
21:50:24.438542 processing result. column_size 64
tds_get_string: reading 20 from wire to give 20 to client.
21:50:24.438566 processing result. type = 108(numeric), varint_size 1
21:50:24.438583 processing result. column_size 5
tds_get_string: reading 14 from wire to give 14 to client.
21:50:24.438607 processing result. type = 39(varchar), varint_size 1
21:50:24.438624 processing result. column_size 64
tds_get_string: reading 23 from wire to give 23 to client.
21:50:24.438648 processing result. type = 35(text), varint_size 4
tds_get_string: reading 25 from wire to give 25 to client.
21:50:24.438672 processing result. column_size 64512
tds_get_string: reading 15 from wire to give 15 to client.
21:50:24.438695 processing result. type = 39(varchar), varint_size 1
21:50:24.438712 processing result. column_size 64
21:50:24.438730 ct_results() process_result_tokens returned 1 (type
4049)
21:50:24.438748 processing result tokens. marker is d1(ROW)
21:50:24.438765 ct_results() process_result_tokens returned 1 (type
4040)
21:50:24.438784 ct_res_info()
21:50:24.438800 ct_res_info(): Number of columns is 13
21:50:24.438820 ct_describe()
21:50:24.438837 _ct_get_client_type(type 108, size 5)
21:50:24.438855 ct_describe() datafmt->datatype = 7 server type 108
21:50:24.438872 ct_bind() datafmt count = 1 column_number = 1
21:50:24.438890 ct_describe()
21:50:24.438906 _ct_get_client_type(type 39, size 64)
21:50:24.438922 ct_describe() datafmt->datatype = 1 server type 39
21:50:24.438938 ct_bind() datafmt count = 1 column_number = 2
21:50:24.438955 ct_describe()
21:50:24.438970 _ct_get_client_type(type 108, size 5)
21:50:24.438986 ct_describe() datafmt->datatype = 7 server type 108
21:50:24.439012 ct_bind() datafmt count = 1 column_number = 3
21:50:24.439031 ct_describe()
21:50:24.439047 _ct_get_client_type(type 108, size 5)
21:50:24.439062 ct_describe() datafmt->datatype = 7 server type 108
21:50:24.439077 ct_bind() datafmt count = 1 column_number = 4
21:50:24.439095 ct_describe()
21:50:24.439110 _ct_get_client_type(type 39, size 16)
21:50:24.439126 ct_describe() datafmt->datatype = 1 server type 39
21:50:24.439142 ct_bind() datafmt count = 1 column_number = 5
21:50:24.439159 ct_describe()
21:50:24.439175 _ct_get_client_type(type 39, size 16)
21:50:24.439191 ct_describe() datafmt->datatype = 1 server type 39
21:50:24.439207 ct_bind() datafmt count = 1 column_number = 6
21:50:24.439224 ct_describe()
21:50:24.439240 _ct_get_client_type(type 108, size 5)
21:50:24.439256 ct_describe() datafmt->datatype = 7 server type 108
21:50:24.439272 ct_bind() datafmt count = 1 column_number = 7
21:50:24.439289 ct_describe()
21:50:24.439305 _ct_get_client_type(type 108, size 5)
21:50:24.439322 ct_describe() datafmt->datatype = 7 server type 108
21:50:24.439338 ct_bind() datafmt count = 1 column_number = 8
21:50:24.439356 ct_describe()
21:50:24.439372 _ct_get_client_type(type 39, size 64)
21:50:24.439388 ct_describe() datafmt->datatype = 1 server type 39
21:50:24.439404 ct_bind() datafmt count = 1 column_number = 9
21:50:24.439437 ct_describe()
21:50:24.439454 _ct_get_client_type(type 108, size 5)
21:50:24.439470 ct_describe() datafmt->datatype = 7 server type 108
21:50:24.439486 ct_bind() datafmt count = 1 column_number = 10
21:50:24.439504 ct_describe()
21:50:24.439519 _ct_get_client_type(type 39, size 64)
21:50:24.439535 ct_describe() datafmt->datatype = 1 server type 39
21:50:24.439551 ct_bind() datafmt count = 1 column_number = 11
21:50:24.439568 ct_describe()
21:50:24.439584 _ct_get_client_type(type 35, size 64512)
21:50:24.439600 ct_describe() datafmt->datatype = 16 server type 35
21:50:24.439628 ct_bind() datafmt count = 1 column_number = 12
21:50:24.439646 ct_describe()
21:50:24.439663 _ct_get_client_type(type 39, size 64)
21:50:24.439687 ct_describe() datafmt->datatype = 1 server type 39
21:50:24.439705 ct_bind() datafmt count = 1 column_number = 13
21:50:24.439730 ct_fetch()
21:50:24.439747 processing row tokens. marker is d1(ROW)
21:50:24.439765 processing row. column is 0 varint size = 1
21:50:24.439781 processing row. column size is 5
21:50:24.439795 clearing column 0 NULL bit
21:50:24.439809 processing row. column is 1 varint size = 1
21:50:24.439824 processing row. column size is 4
21:50:24.439837 clearing column 1 NULL bit
tds_get_char_data: reading 4 on wire for 0 to client
21:50:24.439856 processing row. column is 2 varint size = 1
21:50:24.439870 processing row. column size is 5
21:50:24.439883 clearing column 2 NULL bit
21:50:24.439897 processing row. column is 3 varint size = 1
21:50:24.439911 processing row. column size is 5
21:50:24.439924 clearing column 3 NULL bit
21:50:24.439938 processing row. column is 4 varint size = 1
21:50:24.439953 processing row. column size is 13
21:50:24.439966 clearing column 4 NULL bit
tds_get_char_data: reading 13 on wire for 0 to client
21:50:24.439984 processing row. column is 5 varint size = 1
21:50:24.439998 processing row. column size is 13
21:50:24.440011 clearing column 5 NULL bit
tds_get_char_data: reading 13 on wire for 0 to client
21:50:24.440030 processing row. column is 6 varint size = 1
21:50:24.440044 processing row. column size is 5
21:50:24.440057 clearing column 6 NULL bit
21:50:24.440071 processing row. column is 7 varint size = 1
21:50:24.440085 processing row. column size is 5
21:50:24.440099 clearing column 7 NULL bit
21:50:24.440113 processing row. column is 8 varint size = 1
21:50:24.440126 processing row. column size is 11
21:50:24.440140 clearing column 8 NULL bit
tds_get_char_data: reading 11 on wire for 0 to client
21:50:24.440157 processing row. column is 9 varint size = 1
21:50:24.440171 processing row. column size is 5
21:50:24.440185 clearing column 9 NULL bit
21:50:24.440198 processing row. column is 10 varint size = 1
21:50:24.440267 processing row. column size is 9
21:50:24.440284 clearing column 10 NULL bit
tds_get_char_data: reading 9 on wire for 0 to client
21:50:24.440302 processing row. column is 11 varint size = 4
21:50:24.440317 processing row. column size is 48
21:50:24.440331 clearing column 11 NULL bit
tds_get_char_data: reading 48 on wire for 48 to client
21:50:24.440351 processing row. column is 12 varint size = 1
21:50:24.440366 processing row. column size is 0
21:50:24.440379 setting column 12 NULL bit
21:50:24.440394 ct_fetch()process_row_tokens returned 1
21:50:24.440409 _ct_bind_data()
21:50:24.440422 _ct_get_server_type(1)
21:50:24.440435 _ct_get_client_type(type 108, size 5)
21:50:24.440451 cs_convert()
21:50:24.440466 _ct_get_server_type(7)
21:50:24.440480 _ct_get_server_type(1)
21:50:24.440493 cs_convert() srctype = 108 (35) desttype = 47 (12)
21:50:24.440508 cs_convert() calling tds_convert
21:50:24.440529 cs_convert() tds_convert returned 1
21:50:24.440546 cs_convert() FMT_NULLTERM
21:50:24.440562 cs_convert() returning 1
21:50:24.440576 _ct_get_server_type(1)
21:50:24.440592 _ct_get_client_type(type 39, size 64)
21:50:24.440608 cs_convert()
21:50:24.440623 _ct_get_server_type(1)
21:50:24.440638 _ct_get_server_type(1)
21:50:24.440654 cs_convert() srctype = 47 (4) desttype = 47 (65)
21:50:24.440671 cs_convert() srctype = desttype
21:50:24.440687 cs_convert() desttype = character
21:50:24.440702 _ct_get_server_type(1)
21:50:24.440718 _ct_get_client_type(type 108, size 5)
21:50:24.440731 cs_convert()
21:50:24.440746 _ct_get_server_type(7)
21:50:24.440762 _ct_get_server_type(1)
21:50:24.440777 cs_convert() srctype = 108 (35) desttype = 47 (12)
21:50:24.440795 cs_convert() calling tds_convert
21:50:24.440811 cs_convert() tds_convert returned 1
21:50:24.440828 cs_convert() FMT_NULLTERM
21:50:24.440842 cs_convert() returning 1
21:50:24.440856 _ct_get_server_type(1)
21:50:24.440870 _ct_get_client_type(type 108, size 5)
21:50:24.440884 cs_convert()
21:50:24.440899 _ct_get_server_type(7)
21:50:24.440921 _ct_get_server_type(1)
21:50:24.440937 cs_convert() srctype = 108 (35) desttype = 47 (12)
21:50:24.440953 cs_convert() calling tds_convert
21:50:24.440967 cs_convert() tds_convert returned 1
21:50:24.440983 cs_convert() FMT_NULLTERM
21:50:24.440998 cs_convert() returning 1
21:50:24.441012 _ct_get_server_type(1)
21:50:24.441025 _ct_get_client_type(type 39, size 16)
21:50:24.441039 cs_convert()
21:50:24.441054 _ct_get_server_type(1)
21:50:24.441067 _ct_get_server_type(1)
21:50:24.441080 cs_convert() srctype = 47 (13) desttype = 47 (17)
21:50:24.441093 cs_convert() srctype = desttype
21:50:24.441106 cs_convert() desttype = character
21:50:24.441119 _ct_get_server_type(1)
21:50:24.441131 _ct_get_client_type(type 39, size 16)
21:50:24.441144 cs_convert()
21:50:24.441155 _ct_get_server_type(1)
21:50:24.441168 _ct_get_server_type(1)
21:50:24.441181 cs_convert() srctype = 47 (13) desttype = 47 (17)
[...]
21:50:24.463710 _ct_get_server_type(1)
21:50:24.463730 ct_fetch()
21:50:24.463761 ct_results()
21:50:24.463778 processing result tokens. marker is fd(DONE)
21:50:24.463795 tds_process_end() more_results = 0, was_cancelled = 0
21:50:24.463813 ct_results() process_result_tokens returned 1 (type
4052)
21:50:24.463830 ct_results()
21:50:24.463846 tds_process_result_tokens() state is COMPLETED
21:50:24.463861 ct_results() process_result_tokens returned 2 (type
4052)
21:50:24.464838 ct_con_props() action = CS_GET property = 26
21:50:24.464860 ct_close()
21:50:24.464910 ct_con_drop()

------
Ben Vaughn
Security Analyst
Blackbird Technologies
703-796-1438 W / 703-582-4551 C
bvaughn AT blackbirdtech.com
------


-----Original Message-----
From: James K. Lowden [mailto:jklowden AT schemamania.org]
Sent: Tuesday, July 15, 2003 08:44
To: FreeTDS Development Group
Subject: Re: [freetds] Sybase Incompatibilities?


On Tue, 15 Jul 2003 18:18:59 -0400, "Ben Vaughn"
<bvaughn AT BlackbirdTech.com> wrote:
> (This is with CVS from an hour ago...)
> It looks like Sybase ASA dislikes TDS. It seems to be forcing a
> Database to be specified on login or at least a server name (which is
an
> allowed specification for connection through Open Client)
>
>
> ...Any ideas?

Check the archives since 0.61 for ASA issues. I think the servername
and
database name have to match or something like that. If you dig it up,
I'll add it to the documentation proper.

I think that's the issue.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page