freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000
- From: "Jan Lubbers" <jl75 AT xs4all.nl>
- To: "James K. Lowden" <jklowden AT freetds.org>
- Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000
- Date: Thu, 7 Dec 2006 09:23:10 +0100 (CET)
> Jan Lubbers wrote:
>> Hi all,
>>
>> I'm new to this list...
>>
>> I need some help to get going as I'm lost now.
>>
>> I want to query a SQL Server database from Linux. This should be fairly
>> easy, reading the docs. However, I still cannot get it to work.
> ...
>> -----------------------------------------------------------------------
>> -------- /usr/local/etc/freetds.conf
>> <no changes made>
>> -----------------------------------------------------------------------
>> -------- tsql -C:
>> Compile-time settings (established with the "configure" script):
>> Version: freetds v0.64
>> MS db-lib source compatibility: yes [ALSO TRIED: no]
>> Sybase binary compatibility: unknown
>> Thread safety: yes
>> iconv library: yes
>> TDS version: 5.0 [ALSO TRIED: 8.0]
>> iODBC: no
>> unixodbc: yes
>> -----------------------------------------------------------------------
>> --------
>
> Using tsql without adding your server to ${HOME}/.freetds.conf is tricky,
> because without it, the library doesn't know which TDS version the server
> uses. It tries with the compiled-in default (unless TDSVER is set), which
> gives you roughly 50-50 odds of making a connection.
>
> Try adding a freetds.conf entry like this:
>
> [lt06040]
> host = lt06040
> ### port = 1433
> tds version = 8.0
>
> (I think the default port these days is inferred from the TDS version.)
>
> Then you should be able to connect:
>
> $ tsql -S lt06040 -U sa -P sa
>
> If that doesn't work,
>
> $ export TDSDUMP=dump
> $ tsql -S lt06040 -U sa -P sa
> $ less dump
>
> to make sure it's using the file and connecting to (or trying) the right
> address and port.
>
> Once you have that working, ODBC is the next step. Recent snapshot
> include my "osql" shell script, which tests your configuration files
> before invoking unixODBC's isql. You can just download last night's
> snapshot and extract the script. If you try it, please let me know how it
> works out for you.
>
> HTH.
>
> --jkl
>
Hi,
Thanks for the fast reply.
I tried your first suggestion first, this is the contents of the dumpfile:
----------------------------------
util.c:288:Starting log file for FreeTDS 0.64
on 2006-12-07 09:14:37 with debug flags 0x4fff.
iconv.c:195:names for ISO-8859-1: ISO-8859-1
iconv.c:195:names for UTF-8: UTF-8
iconv.c:195:names for UCS-2LE: UCS-2LE
iconv.c:195:names for UCS-2BE: UCS-2BE
iconv.c:361:iconv to convert client-side data to the "UTF-8" character set
iconv.c:514:tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
iconv.c:514:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:168:Connecting to 192.168.0.100 port 1433.
net.c:256:connect error: Connection refused
util.c:119:Changing query state from IDLE to DEAD
token.c:2252:tds_client_msg: #20009: "Server is unavailable or does not
exist.". Connection state is now 4.
mem.c:519:tds_free_all_results()
----------------------------------
I then tried to telnet to the Windows PC on port 1433, but this connection
was refused also. Telnet to other machines works, though (e.g.
mud.ludd.luth.se 3000). I'm looking into that now, but suggestions are
_very_ welcome.
Jan
-
[freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000,
Jan Lubbers, 12/06/2006
-
Re: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000,
James K. Lowden, 12/07/2006
- Re: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000, Jan Lubbers, 12/07/2006
- Re: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000, Jan Lubbers, 12/19/2006
-
Re: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000,
James K. Lowden, 12/07/2006
Archive powered by MHonArc 2.6.24.