[freetds] Freepascal with FreeTDS/UnixODBC

Scott Johnson scomps at purplewire.org
Tue Jul 20 01:10:55 EDT 2004


*This message was transferred with a trial version of CommuniGate(tm) Pro*
sorry for the delay in this.  here's the tdsdump logfile transactions.  In
looking at it, I saw it was connecting with TDS 8.0 and decided to try
lowering it to 7.0 which got it talking to the server better.  It did fail,
but I'm certain it failed with some kinda of error in the pascal code itself
because it was an error report from pascal itself.  It's 1am here and I'm
brain fried and just don't have the ambition to dig into it tonight.

As it is a SQL Server 2000, I would have assumed that 8.0 would have been
appropriate, but maybe not.  In any event, I've included the dump log just
in case there's something relevent with that.

For reference, the system I'm running it on is a dual processor (pentium pro
200) Compaq ProLiant 6000 with 384Mb of RAM, and a pair of RAID 5 arrays on
Smart 2D controllers  (I love ebay.. got two of these for $50 each), running
RedHat 9 with this response from uname -a

Linux uranus.purplewire.org 2.4.20-30.9smp #1 SMP Wed Feb 4 20:36:46 EST
2004 i686 i686 i386 GNU/Linux

I'm also running the most recent stable UnixODBC, and the testing version of
FreeTDS (for some reason I couldn't get the stable to compile.. go figure
but I'm not overly concerned with that at the moment as the nightly version
did without any problems.

The version of FreePascal I'm running is 1.0.10 and is the latest stable
build of that language as well.  It can be found at
http://www.freepascal.org.  FreePascal is one of the slickest and most
complete pascal/delphi compilers around.  I'm not part of the development
team so this isn't a shameless plug.  I honestly like the product :)

The code I'm executing is one of the ODBC samples  (testodbc.pp) that can be
found in /usr/doc/fpc-1.0.10/examples/odbc once it's installed.  Of course
I've modified the DSN information to connect to the DSN provided by
FreeTDS/UnixODBC, and imported the mdb file it's referencing into a database
on the SQL Server which is running SQL Server 2000 under Windows 2000
Advanced Server.  The one hitch with the SQL Server is that it's a named
instance (JUPITER\SQL_SERVER rather than just JUPITER) although I've never
had a problem with that before.  Neither machine is firewalled and
communicate on a non-routable 192.168.1.x subnet.

The relevent freetds.conf information is:

[VISTA_NW]
        host = 192.168.1.5
        port = 1433
        tds version = 7.0
        dump file = /home/scott/freetds.log
        dump file append = yes
  (note the version *used* to be 8.0)

If you need any further information let me know and I'll answer on the list,
if you'd like access to the box to poke around a bit, get with me off the
list and I'll provide information there as well.  This isn't a serious
production machine so there's not much damage than can be done to it if some
experimentation is required.

Regards,

Scott


pid: 15469:Starting log file for FreeTDS 0.63.dev.20040718
 on 2004-07-20 00:46:57 with debug level 99.
pid: 15469:names for ISO-8859-1: ISO-8859-1
pid: 15469:names for UTF-8: UTF-8
pid: 15469:names for UCS-2LE: UCS-2LE
pid: 15469:names for UCS-2BE: UCS-2BE
pid: 15469:iconv to convert client-side data to the "ISO-8859-1" character
set
pid: 15469:00:46:57.460187 tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
pid: 15469:00:46:57.460771 tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
pid: 15469:00:46:57.461228 Connecting to 192.168.1.5 port 1433, TDS 8.0.
pid: 15469:00:46:57.462777 tds_put_string converting 21 bytes of
"uranus.purplewire.org"
pid: 15469:00:46:57.463262 tds_put_string wrote 42 bytes
pid: 15469:00:46:57.463606 tds_put_string converting 2 bytes of "sa"
pid: 15469:00:46:57.463976 tds_put_string wrote 4 bytes
pid: 15469:00:46:57.464329 tds_put_string wrote 0 bytes
pid: 15469:00:46:57.464669 tds_put_string converting 6 bytes of "SYBASE"
pid: 15469:00:46:57.465048 tds_put_string wrote 12 bytes
pid: 15469:00:46:57.465389 tds_put_string wrote 0 bytes
pid: 15469:00:46:57.465728 tds_put_string converting 10 bytes of
"us_english"
pid: 15469:00:46:57.466099 tds_put_string wrote 20 bytes
pid: 15469:00:46:57.466439 tds_put_string converting 8 bytes of "VISTA_NW"
pid: 15469:00:46:57.466809 tds_put_string wrote 16 bytes
pid: 15469:00:46:57.467386 tds_process_login_tokens()
pid: 15469:Received header @ 00:46:57.529230
0000 04 01 01 a9 00 33 01 00-                        |.....3..|


pid: 15469:Received packet @ 00:46:57.529768
0000 e3 1f 00 01 08 56 00 49-00 53 00 54 00 41 00 5f |.....V.I .S.T.A._|
0010 00 4e 00 57 00 06 6d 00-61 00 73 00 74 00 65 00 |.N.W..m. a.s.t.e.|
0020 72 00 ab 7e 00 45 16 00-00 02 00 27 00 43 00 68 |r..~.E.. ...'.C.h|
0030 00 61 00 6e 00 67 00 65-00 64 00 20 00 64 00 61 |.a.n.g.e .d. .d.a|
0040 00 74 00 61 00 62 00 61-00 73 00 65 00 20 00 63 |.t.a.b.a .s.e. .c|
0050 00 6f 00 6e 00 74 00 65-00 78 00 74 00 20 00 74 |.o.n.t.e .x.t. .t|
0060 00 6f 00 20 00 27 00 56-00 49 00 53 00 54 00 41 |.o. .'.V .I.S.T.A|
0070 00 5f 00 4e 00 57 00 27-00 2e 00 12 4a 00 55 00 |._.N.W.' ....J.U.|
0080 50 00 49 00 54 00 45 00-52 00 5c 00 53 00 51 00 |P.I.T.E. R.\.S.Q.|
0090 4c 00 5f 00 53 00 45 00-52 00 56 00 45 00 52 00 |L._.S.E. R.V.E.R.|
00a0 00 00 00 e3 08 00 07 05-09 04 d0 00 34 00 e3 17 |........ ....4...|
00b0 00 02 0a 75 00 73 00 5f-00 65 00 6e 00 67 00 6c |...u.s._ .e.n.g.l|
00c0 00 69 00 73 00 68 00 00-ab 7e 00 47 16 00 00 01 |.i.s.h.. .~.G....|
00d0 00 27 00 43 00 68 00 61-00 6e 00 67 00 65 00 64 |.'.C.h.a .n.g.e.d|
00e0 00 20 00 6c 00 61 00 6e-00 67 00 75 00 61 00 67 |. .l.a.n .g.u.a.g|
00f0 00 65 00 20 00 73 00 65-00 74 00 74 00 69 00 6e |.e. .s.e .t.t.i.n|
0100 00 67 00 20 00 74 00 6f-00 20 00 75 00 73 00 5f |.g. .t.o . .u.s._|
0110 00 65 00 6e 00 67 00 6c-00 69 00 73 00 68 00 2e |.e.n.g.l .i.s.h..|
0120 00 12 4a 00 55 00 50 00-49 00 54 00 45 00 52 00 |..J.U.P. I.T.E.R.|
0130 5c 00 53 00 51 00 4c 00-5f 00 53 00 45 00 52 00 |\.S.Q.L. _.S.E.R.|
0140 56 00 45 00 52 00 00 00-00 ad 36 00 01 71 00 00 |V.E.R... ..6..q..|
0150 01 16 4d 00 69 00 63 00-72 00 6f 00 73 00 6f 00 |..M.i.c. r.o.s.o.|
0160 66 00 74 00 20 00 53 00-51 00 4c 00 20 00 53 00 |f.t. .S. Q.L. .S.|
0170 65 00 72 00 76 00 65 00-72 00 00 00 00 00 08 00 |e.r.v.e. r.......|
0180 02 f8 e3 13 00 04 04 34-00 30 00 39 00 36 00 04 |.......4 .0.9.6..|
0190 34 00 30 00 39 00 36 00-fd 00 00 00 00 00 00 00 |4.0.9.6. ........|
01a0 00                     -                        |.|


pid: 15469:00:46:57.534290 looking for login token, got  e3(ENVCHANGE)
pid: 15469:00:46:57.534661 tds_process_default_tokens() marker is
e3(ENVCHANGE)
pid: 15469:tds_get_string: reading 16 from wire to give 8 to client.
pid: 15469:tds_get_string: reading 12 from wire to give 6 to client.
pid: 15469:00:46:57.535791 looking for login token, got  ab(INFO)
pid: 15469:00:46:57.536144 tds_process_default_tokens() marker is ab(INFO)
pid: 15469:tds_get_string: reading 78 from wire to give 39 to client.
pid: 15469:tds_get_string: reading 36 from wire to give 18 to client.
pid: 15469:00:46:57.537292 looking for login token, got  e3(ENVCHANGE)
pid: 15469:00:46:57.537805 tds_process_default_tokens() marker is
e3(ENVCHANGE)





More information about the FreeTDS mailing list