Skip to Content.
Sympa Menu

freetds - Re: [freetds] Can connect with TDS, but not ODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Casey Allen Shobe <cshobe AT osss.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Can connect with TDS, but not ODBC
  • Date: Tue, 02 Mar 2004 13:24:34 -0500

Lowden, James K wrote:
unixODBC and FreeTDS are both installed in /usr/lib, yes?

Well in a prefix of /usr, yes. Libraries are all in /usr/lib.

What shows up in the TDSDUMP log?

Oops, I missed that part in the user guide. Just enabled it and here's what I get:

Starting log file for FreeTDS 0.62.1
on 2004-03-02 13:15:06 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
13:15:06.089572 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
13:15:06.089652 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
13:15:06.089701 Connecting to 172.16.0.216 port 1433, TDS 8.0.
13:15:06.090066 tds_put_string converting 5 bytes of "bluto"
13:15:06.090118 tds_put_string wrote 10 bytes
13:15:06.090137 tds_put_string converting 2 bytes of "sa"
13:15:06.090171 tds_put_string wrote 4 bytes
13:15:06.090190 tds_put_string wrote 0 bytes
13:15:06.090208 tds_put_string converting 12 bytes of "172.16.0.216"
13:15:06.090229 tds_put_string wrote 24 bytes
13:15:06.090247 tds_put_string wrote 0 bytes
13:15:06.090264 tds_put_string converting 10 bytes of "us_english"
13:15:06.090285 tds_put_string wrote 20 bytes
13:15:06.090303 tds_put_string converting 10 bytes of "adreportdb"
13:15:06.090324 tds_put_string wrote 20 bytes
13:15:06.090388 tds_process_login_tokens()
Received header @ 13:15:06.091705
0000 04 01 01 07 00 00 01 00- |........|


Received packet @ 13:15:06.091754
0000 aa ae 00 dc 0f 00 00 01-0b 42 00 43 00 61 00 6e |........ .B.C.a.n|
0010 00 6e 00 6f 00 74 00 20-00 6f 00 70 00 65 00 6e |.n.o.t. .o.p.e.n|
0020 00 20 00 64 00 61 00 74-00 61 00 62 00 61 00 73 |. .d.a.t .a.b.a.s|
0030 00 65 00 20 00 72 00 65-00 71 00 75 00 65 00 73 |.e. .r.e .q.u.e.s|
0040 00 74 00 65 00 64 00 20-00 69 00 6e 00 20 00 6c |.t.e.d. .i.n. .l|
0050 00 6f 00 67 00 69 00 6e-00 20 00 27 00 61 00 64 |.o.g.i.n . .'.a.d|
0060 00 72 00 65 00 70 00 6f-00 72 00 74 00 64 00 62 |.r.e.p.o .r.t.d.b|
0070 00 27 00 2e 00 20 00 4c-00 6f 00 67 00 69 00 6e |.'... .L .o.g.i.n|
0080 00 20 00 66 00 61 00 69-00 6c 00 73 00 2e 00 0f |. .f.a.i .l.s....|
0090 41 00 49 00 52 00 44 00-45 00 46 00 45 00 4e 00 |A.I.R.D. E.F.E.N.|
00a0 2d 00 4f 00 44 00 32 00-44 00 54 00 38 00 00 00 |-.O.D.2. D.T.8...|
00b0 00 aa 42 00 18 48 00 00-01 0e 1b 00 4c 00 6f 00 |..B..H.. ....L.o.|
00c0 67 00 69 00 6e 00 20 00-66 00 61 00 69 00 6c 00 |g.i.n. . f.a.i.l.|
00d0 65 00 64 00 20 00 66 00-6f 00 72 00 20 00 75 00 |e.d. .f. o.r. .u.|
00e0 73 00 65 00 72 00 20 00-27 00 73 00 61 00 27 00 |s.e.r. . '.s.a.'.|
00f0 2e 00 00 00 00 00 fd 02-00 00 00 00 00 00 00 |........ .......|


13:15:06.092171 looking for login token, got aa(ERROR)
13:15:06.092192 tds_process_default_tokens() marker is aa(ERROR)
tds_get_string: reading 132 from wire to give 66 to client.
tds_get_string: reading 30 from wire to give 15 to client.
13:15:06.092294 looking for login token, got aa(ERROR)
13:15:06.092315 tds_process_default_tokens() marker is aa(ERROR)
tds_get_string: reading 54 from wire to give 27 to client.
13:15:06.092368 looking for login token, got fd(DONE)
13:15:06.092389 tds_process_default_tokens() marker is fd(DONE)
13:15:06.092411 tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
13:15:06.092447 tds_process_end() state set to TDS_IDLE
13:15:06.092467 leaving tds_process_login_tokens() returning 0
13:15:06.092529 tds_client_msg: #20014: "Login incorrect.". Connection state is now 2.

The password _is_ right though...I'm certain of that. If I don't specify it on the commandline I just get:

0000 aa 42 00 18 48 00 00 01-0e 1b 00 4c 00 6f 00 67 |.B..H... ...L.o.g|
0010 00 69 00 6e 00 20 00 66-00 61 00 69 00 6c 00 65 |.i.n. .f .a.i.l.e|
0020 00 64 00 20 00 66 00 6f-00 72 00 20 00 75 00 73 |.d. .f.o .r. .u.s|
0030 00 65 00 72 00 20 00 27-00 73 00 61 00 27 00 2e |.e.r. .' .s.a.'..|
0040 00 00 00 00 00 fd 02 00-00 00 00 00 00 00 |........ ......|

Also the hostname shown in the packet dump is indeed the correct machine.

Your odbc.ini looks OK to me. What's in odbcinst.ini?

The ODBC-only section didn't mention it, so I didn't touch it. Here's what came with unixODBC:

# Example driver definitinions
#
#

# Included in the unixODBC package
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1


# From the MyODBC package
#[MySQL]
#Description = ODBC for MySQL
#Driver = /usr/lib/libmyodbc.so
#FileUsage = 1


Thanks,

--
Casey Allen Shobe
cshobe AT osss.net




Archive powered by MHonArc 2.6.24.

Top of Page