Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problem connecting to database

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Peter Ross" <peter AT emailross.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problem connecting to database
  • Date: Tue, 28 Oct 2008 15:24:18 +1100

On Tue, Oct 28, 2008 at 2:32 PM, James K. Lowden <jklowden AT freetds.org> wrote:
> Peter Ross wrote:
>>
>> I can connect using the user 'sa' but I cannot connect using the user
>> 'MCTests' which I have defined myself.
>> I can connect using 'MCTests' using ODBC from Windows Vista.
> ...
>> I'm guessing it is actually a problem with the SQL server 2000
>> configuration but I have got no ideas where to look.
>
> Everything points to a server-side issue. The MCTests login is rejected
> by the server after you send the login packet.
>
> This is an ODBC connection. It may be that MCTests is not a user of his
> default database. That could cause the server to reject the login. If
> that's the issue, he'd be able to log in with tsql.
>
I found my problem.

It was that there are two sql servers running on the machine that I
was connecting to, SQL Server 2000 and SQL Server 2005.

I originally tried the line
Server = VDIW-DBTEST1.missioncriticalit.com\MSSQL2K

but got the following error

$ TDSDUMP=stdout isql -v oligood MCTests password
15:20:12.336372 Starting log file for FreeTDS 0.63
on 2008-10-28 15:20:12 with debug level 99.
15:20:12.336489 names for ISO-8859-1: ISO-8859-1
15:20:12.336513 names for UTF-8: UTF-8
15:20:12.336528 names for UCS-2LE: UCS-2LE
15:20:12.336545 names for UCS-2BE: UCS-2BE
15:20:12.336561 iconv to convert client-side data to the "UTF-8" character set
15:20:12.336702 tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
15:20:12.336755 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
15:20:12.336777 IP address pointer is NULL
15:20:12.336798 Server VDIW-DBTEST1.missioncriticalit.com\MSSQL2K not found!
15:20:12.336816 tds_free_all_results()
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect

However I just tried using v0.82 and it logs in fine. I guess 0.63
doesn't support the full syntax

Here is my latest .odbc.ini

[oligood]
Driver = /usr/local/stow/freetds-0.82/lib/libtdsodbc.so
Description = TDS driver (Sybase/MS SQL)
Port = 1433
TDS_Version = 7.0
Database = OliGood_TST 20080624
Server = VDIW-DBTEST1.missioncriticalit.com\MSSQL2K

Thanks everyone for their help.




Archive powered by MHonArc 2.6.24.

Top of Page