freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[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: freetds AT lists.ibiblio.org
- Subject: [freetds] Question: configuration of FreeTDS 0.64 with unixODBC-2.2.12 to MS SQL Server 2000
- Date: Wed, 6 Dec 2006 22:42:53 +0100 (CET)
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.
My setup is as follows:
- I use a Windows PC running Windows XP Pro SP2, hostname jan,
192.168.0.100 (fixed ip address).
- I use a Linux box running Ubuntu 6.06 LTS, hostname lt06040,
192.168.0.101 (fixed ip address).
- I have connected the two machines with a cross cable.
I have installed the following (using 'sudo' when needed, as I'm on Ubuntu):
- FreeTDS 0.64 and unixODBC 2.2.12 on Linux.
- SQL Server 2000 on Windows.
I have configured SQL Server with mixed mode authentication.
For testing purposes I use the user 'sa' with password 'sa' on default
database 'Northwind'.
This is what I have seen:
Network:
- Both machines (Windows and Linux) can ping eachother successfully on ip
address and on hostname.
SQL Server:
- I can query the SQL Server database successfully through Enterprise
Manager, Query Analyzer and on the commandline with isql and osql (both
locally and from a remote Windows PC).
unixODBC:
- When I run ODBCConfig I can configure the FreeTDS driver, System DSNs
and/or User DSNs (using 'sudo' when needed, as I'm on Ubuntu).
- When I run 'odbcinst' I can configure the FreeTDS driver, Systems DSNs
and/or User DSNs (using 'sudo').
- When I run DataManager I can see the configured driver and data source.
This is what doesn't work:
- When I try to login on the SQL Server through the DataManager it fails.
[unixODBC][FreeTDS][SQL Server]Unable to connect to datasource
- When I try to login on the SQL Server with 'isql' it fails:
With a correct DSN: isql -v MSSQLTestServer
[ISQL]ERROR: Could not SQLConnect
With a non-existent DSN: isql -v dummy_DSN
[IM002][unixODBC][Driver Manager]Data source name not found, and no
default driver specified
[ISQL]ERROR: Could not SQLConnect
- When I try to login on the SQL Server with 'tsql' it fails in two
different ways:
1)
a) with the valid hostname and a portnumber: tsql -H jan -p 1433 -U sa -P sa
b) with the valid ip address and a portnumber: tsql -H 192.168.0.100 -p
1433 -U sa -P sa
c) with an invalid ip address and a portnumber: tsql -H 99.99.99.99 -p
1433 -U sa -P sa
Result:
locale is "en_AU.UTF-8"
locale charset is "UTF-8
And then it hangs...
2)
a) with an invalid hostname: tsql -H dummy_host -p 1433 -U sa -P sa
b) with a valid DSN: tsql -S MSSQLServer -U sa -P sa
Result:
locale is "en_AU.UTF-8"
locale charset is "UTF-8
There was a problem connecting to the server
Evaluation:
I have tried multiple configurations to try to get it to work.
I have configured FreeTDS with and without '--enable-msdblib' (MS db-lib
source compatibility).
I have configured FreeTDS with different versions of TDS.
Etc. etc.
Now, I'm totally lost.
I cannot see what is going wrong or what I'm doing wrong.
I believe I am missing something obvious, but I cannot see what it is...
Could anyone please help me with this problem?
I am looking for a minimal configuration that works..
I have tried 'ODBC-only' configurations mostly.
-------------------------------------------------------------------------------
/usr/local/etc/odbcinst.ini:
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/local/lib/libtdsodbc.so
UsageCount = 1
-------------------------------------------------------------------------------
~/.odbc.ini:
[MSSQLTestServer]
Description = Sample
Driver = FreeTDS
Database = Northwind
Server = 192.168.0.100
Port = 1433
TDS_Version = 8.0
-------------------------------------------------------------------------------
/usr/local/etc/odbc.ini:
<empty>
-------------------------------------------------------------------------------
/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
-------------------------------------------------------------------------------
odbcinst -j:
unixODBC 2.2.12
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
USER DATA SOURCES..: /home/jan/.odbc.ini
-------------------------------------------------------------------------------
odbcinst -q -d:
[FreeTDS]
-------------------------------------------------------------------------------
odbcinst -q -s:
[MSSQLTestServer]
-------------------------------------------------------------------------------
-
[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.