Skip to Content.
Sympa Menu

freetds - Re: [freetds] TSQL error - connect error: Not owner

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] TSQL error - connect error: Not owner
  • Date: Mon, 11 Feb 2008 14:06:36 +0100

>
> Hi,
> I am trying a tsql connection from HP-UX to SQL*Server 2000
> on Windows XP and get the following error -
>
> tsql -H xxx.xxx.xxx -p 1433 -U salocale is "C C C C C
> C"locale charset is "roman8"Password:Msg 20009, Level 9,
> State 0, Server OpenClient, Line 0Server is unavailable or
> does not exist.There was a problem connecting to the server
> I can ping and telnet the address xxx.xxx.xxx
>
> /usr/local/etc# telnet xxx.xxx.xxx 1433Trying...Connected to
> xxx.xxx.xxx.Escape character is '^]'.
>
> After setting TDSDUMP the log file shows -
>
> util.c:288:Starting log file for FreeTDS 0.64 on
> 2008-02-11 11:54:31 with debug flags 0x4fff.iconv.c:195:names
> for ISO-8859-1: iso81iconv.c:195:names for UTF-8:
> UTF-8iconv.c:195:names for UCS-2LE: (null)iconv.c:195:names
> for UCS-2BE: ucs2iconv.c:361:iconv to convert client-side
> data to the "roman8" character
> seticonv.c:514:tds_iconv_info_init: converting
> "ROMAN8"->"UCS-2LE"net.c:168:Connecting to xxx.xxx.xxx port
> 1433.net.c:256:connect error: Not ownerutil.c:119:Changing
> query state from IDLE to DEADtoken.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()
> Any suggestions ? I couldn't find anything on the web to help.
>
> Regards,
> Mike

Try applying post 0.64 patch at http://freetds.sourceforge.net/.
If this does not work try adding a

len = 0;

line before getsockopt line. Newer versions have this fix, it seems that
getsockopt does not set len to 0 if no error.

However looking at net.c change and ChangeLog I can see

http://freetds.cvs.sourceforge.net/freetds/freetds/src/tds/net.c?r1=1.40
&r2=1.41

Wed Aug 23 17:16:10 CET 2006 Frediano Ziglio <freddy77_A_gmail_D_com>
* src/tds/net.c:
- clean error before reading SO_ERROR, some system need this
* src/tds/util.c src/ctlib/ct.c: cross compile fixes

So it seems that len = 0 is the correct solution. Tell me if it works so
I'll backport the fix.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page