Skip to Content.
Sympa Menu

freetds - Re: [freetds] tsql: Adaptive Server connection failed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tacho <tachoymu AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tsql: Adaptive Server connection failed
  • Date: Thu, 22 Jul 2010 11:10:20 -0700

Problem Fixed,

I Write here the solution in case anyone could have a similar situation.

The solution is very simple, only set TDSVER=7.0 and run both isql or tsql:

# export TDSVER=7.0
# regatta[/u02/local/freetds]> isql sqlserver sa x1234
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>

# tsql -S sqlserver -U sa -P x1234
locale is "en_US en_US en_US en_US en_US en_US"
locale charset is "ISO8859-1"
1> use PEXPRESS
2> go
1>

Only one question to freeTDS support or development team:
Why should we change the version of TDS if it is 0.82 or 5.0? Why is run
fine with a different version?

Regards.

2010/7/22 Tacho <tachoymu AT gmail.com>

> Additional information:
>
> # tsql -C
> Compile-time settings (established with the "configure" script)
> Version: freetds v0.82
> freetds.conf directory: /u02/local/etc
> MS db-lib source compatibility: no
> Sybase binary compatibility: no
> Thread safety: yes
> iconv library: no
> TDS version: 5.0
> iODBC: no
> unixodbc: yes
>
> Here i'm very confused between Version: freetds v0.82 and TDS version: 5.0,
> which of them should be take as the correct version?
>
> Regards.
>
> 2010/7/22 Tacho <tachoymu AT gmail.com>
>
> *FACTS:*
>>
>> Oracle Server Machine: AIX 5L 5.3 (64bit)
>> Oracle Release: 11g R1
>> CC Compiler: gcc 3.3.2
>> freeTDS version:0.82
>> unixODBC version:2.3.0
>> MS SQL Server Machine: Windows Server 2003
>> SQL Server release: SQL Server 2005
>>
>> when we run tsql command to make a connection from Oracle to MS SQL
>> Server, the following error is thrown:
>>
>> regatta[/u02/local/etc]> tsql -H sqlserver -p 1433 -U sa -P x1234
>> locale is "en_US en_US en_US en_US en_US en_US"
>> locale charset is "ISO8859-1"
>> Msg 20017, Level 9, State -1, Server OpenClient, Line -1
>> Unexpected EOF from the server
>> Msg 20002, Level 9, State -1, Server OpenClient, Line -1
>> Adaptive Server connection failed
>> There was a problem connecting to the server
>>
>> the following messages can be seen in tsql log file after running the
>> above command:
>>
>> 08:48:53.474852 1724446 (log.c:190):Starting log file for FreeTDS 0.82
>> on 2010-07-22 08:48:53 with debug flags 0xffff.
>> 08:48:53.475135 1724446 (iconv.c:78):Using trivial iconv
>> 08:48:53.475170 1724446 (iconv.c:197):names for ISO-8859-1: ISO-8859-1
>> 08:48:53.475180 1724446 (iconv.c:197):names for UTF-8: UTF-8
>> 08:48:53.475187 1724446 (iconv.c:197):names for UCS-2LE: UCS-2LE
>> 08:48:53.475195 1724446 (iconv.c:197):names for UCS-2BE: (null)
>> 08:48:53.475203 1724446 (iconv.c:363):iconv to convert client-side data to
>> the "ISO8859-1" character set
>> 08:48:53.475219 1724446 (iconv.c:516):tds_iconv_info_init: converting
>> "ISO-8859-1"->"UCS-2LE"
>> 08:48:53.475432 1724446 (net.c:210):Connecting to 192.168.210.182 port
>> 1433 (TDS version 5.0)
>> 08:48:53.490244 1724446 (net.c:264):tds_open_socket: connect(2) returned
>> "A connect operation on a socket is not complete."
>> 08:48:53.490266 1724446 (net.c:303):tds_open_socket() succeeded
>> 08:48:53.490276 1724446 (util.c:162):Changed query state from DEAD to IDLE
>>
>>
>> and also, when isql command is run the following error is issued:
>>
>> regatta[/u02/local/etc]> isql sqlserver sa x1234 -v
>> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
>> [01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
>> [01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
>> [ISQL]ERROR: Could not SQLConnect
>>
>> I don't know why, if everthing appears to be correct:
>>
>> odbc.ini
>>
>> [SQLSERVER]
>> Driver=TDS
>> Trace=0
>> TraceFile=/tmp/sqlserver.log
>> Servername=192.168.210.182
>> Database=PEDB
>> Port=1433
>>
>> odbcinst.ini
>>
>> [TDS]
>> Description=FreeTDS driver
>> driver=/u02/local/lib/libtdsodbc.so.0
>> Setup=/u02/local/lib/libtdsodbc.so.0
>> Trace=Yes
>> TraceFile=/tmp/freetds.log
>> FileUsage=1
>> UsageCount=1
>>
>> freetds.conf
>>
>> [SQLSERVER]
>> host = 192.168.210.182
>> port = 1433
>> tds version = 0.82
>>
>> and if we do a connection test using telnet and ping everthing work as
>> expected
>>
>> # ping 192.168.210.182
>> PING 192.168.10.82: (192.168.10.82): 56 data bytes
>> 64 bytes from 192.168.210.182: icmp_seq=0 ttl=128 time=0 ms
>> 64 bytes from 192.168.210.182: icmp_seq=1 ttl=128 time=0 ms
>> 64 bytes from 192.168.210.182: icmp_seq=2 ttl=128 time=0 ms
>> 64 bytes from 192.168.210.182: icmp_seq=3 ttl=128 time=0 ms
>> ..
>> ..
>> ----192.168.10.82 PING Statistics----
>> 14 packets transmitted, 14 packets received, 0% packet loss
>> round-trip min/avg/max = 0/0/1 ms
>>
>> # telnet 192.168.210.182 1433
>> Trying...
>> Connected to 192.168.210.182.
>> Escape character is '^]'.
>> quit
>> Connection closed.
>>
>>
>>
>> Hope you can shed some light on this problem.
>>
>> thanks and regards.
>> Tacho
>>
>
>




Archive powered by MHonArc 2.6.24.

Top of Page