freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83
- From: Zhouhua Li <zhouhua.li AT gmail.com>
- To: ikorot AT earthlink.net
- Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83
- Date: Thu, 29 Jul 2010 14:10:51 -0400
I have some code on Linux using libtds that connects to the same
machine and same port. It works perfectly. Now my goal is to make the
same code work on Window.
On Thu, Jul 29, 2010 at 2:00 PM, <ikorot AT earthlink.net> wrote:
> Hi,
> Are you sure that SQL Server listens on the 1433?
> AFAIR, this is the default port, which can be changed during install....
>
>
> -----Original Message-----
>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>Sent: Jul 29, 2010 7:32 AM
>>To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
>>Cc: ikorot AT earthlink.net
>>Subject: Re: [freetds] tsql:Adaptive Server connection failed with MinGW
>>Build of FreeTDS 0.83
>>
>>Sorry I did not make it clear in my previous emails.
>>
>>I used MinGW for Windows and MSYS combination to run the configure
>>scripts that comes with FreeTDS and make the build. I did not create
>>my own project file. The configure/make scripts only successfully
>>built the libtds.a but failed on other client solutions such as odbc,
>>ct_lib and db_lib. However libtds.a is all I need. I then proceed to
>>run make in /src/apps subdirectory to build tsql utility program that
>>comes with the FreeTDS package so that I can make sure libtds.a works
>>fine.
>>
>>The command I used to run tsql is along the lines as follows:
>>
>>TDSDUMP=dump3.log tsql -S SQL8 -D base_test -U
>>'MyCompanyDomain\myaccount' - P mypassword -I /c/f2/freetds.conf
>>
>>The configure file freetds.conf reads like this:
>>
>>[global]
>> # TDS protocol version
>>; tds version = 7.0
>>
>> # Whether to write a TDSDUMP file for diagnostic purposes
>> # (setting this to /tmp is insecure on a multi-user system)
>>; dump file = /c/f2/src/apps/dump3.log
>>; debug flags = 0xffff
>>
>> # Command and connection timeouts
>>; timeout = 10
>>; connect timeout = 10
>>
>> # If you get out-of-memory errors, it may mean that your client
>> # is trying to allocate a huge buffer for a TEXT field.
>> # Try setting 'text size' to a more reasonable limit
>> text size = 64512
>>
>># A typical Microsoft server
>>[SQL8]
>> host = SQL8.MyCompany.COM
>> port = 1433
>> tds version = 7.0
>>
>>
>>
>>
>>On Thu, Jul 29, 2010 at 3:15 AM, Frediano Ziglio <freddy77 AT gmail.com> wrote:
>>> Recently I did some tests with cross compiled version for Windows and
>>> I can say ODBC tests works correctly as expected. In this case I used
>>> MingW for Linux, configure script and Makefiles we provided. I imagine
>>> you build some kind of project file for MingW for Windows or just used
>>> configure scripts? If you wrote a project file did you follow
>>> instructions at README.Windows ??
>>>
>>> Regards
>>> Frediano Ziglio
>>>
>>> 2010/7/29 <ikorot AT earthlink.net>:
>>>> Hi, Zhouhua,
>>>>
>>>>
>>>> -----Original Message-----
>>>>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>>>>Sent: Jul 28, 2010 2:22 PM
>>>>>To: ikorot AT earthlink.net, FreeTDS Development Group
>>>>><freetds AT lists.ibiblio.org>
>>>>>Subject: Re: [freetds] tsql:Adaptive Server connection failed with MinGW
>>>>>Build of FreeTDS 0.83
>>>>>
>>>>>Yes, I can ping/telnet to the machine/port without problem.
>>>>
>>>> OK.
>>>>
>>>>>All
>>>>>machines sit in an intranet so there is no firewall between them.
>>>>
>>>> OK.
>>>>
>>>>> I
>>>>>only managed to build libtds.lib and tsql, not any client solutions.
>>>>>It's my understanding tsql only needs libtds.lib. Please correct me if
>>>>>I'm wrong. Finally the database I'm trying to connect to is Microsoft
>>>>>SQL Server not Sybase.
>>>>
>>>> What is you configure options?
>>>> Can you post some code that you are using to connect to the DB?
>>>>
>>>> Thank you.
>>>>
>>>>>
>>>>>Thank you.
>>>>>
>>>>>Zhouhua
>>>>>
>>>>>
>>>>>On Wed, Jul 28, 2010 at 4:20 PM, <ikorot AT earthlink.net> wrote:
>>>>>> Hi, Zhouhua,
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>>>From: Zhouhua Li <zhouhua.li AT gmail.com>
>>>>>>>Sent: Jul 28, 2010 6:42 AM
>>>>>>>To: freetds AT lists.ibiblio.org
>>>>>>>Subject: [freetds] tsql:Adaptive Server connection failed with MinGW
>>>>>>>Build of FreeTDS 0.83
>>>>>>>
>>>>>>>There was a discussion about a similar topic a few months ago. I can
>>>>>>>not see what the conclusion is and wonder if somebody can help me. I
>>>>>>>played with different TDS protocol versions, 7.0 and 8.0, when issuing
>>>>>>>tsql command. The error and log messages are similar.
>>>>>>>
>>>>>>>>>>> Facts:
>>>>>>>
>>>>>>>Compiler: MinGW + Msys, gcc version 4.2.1
>>>>>>>Database: MS SQL Server 2005
>>>>>>>
>>>>>>>>>>> Error from tsql command:
>>>>>>>
>>>>>>>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
>>>>>>>
>>>>>>>>>>> log file:
>>>>>>>
>>>>>>>log.c:196:Starting log file for FreeTDS 0.83.dev.20100720
>>>>>>> on 2010-07-27 22:37:44 with debug flags 0x4fff.
>>>>>>>iconv.c:337:tds_iconv_open(003D43A8, 1252)
>>>>>>>iconv.c:312:Using trivial iconv
>>>>>>>iconv.c:197:local name for ISO-8859-1 is ISO-8859-1
>>>>>>>iconv.c:197:local name for UTF-8 is UTF-8
>>>>>>>iconv.c:197:local name for UCS-2LE is UCS-2LE
>>>>>>>iconv.c:197:local name for UCS-2BE is UCS-2BE
>>>>>>>iconv.c:365:setting up conversions for client charset "1252"
>>>>>>>iconv.c:367:preparing iconv for "1252" <-> "UCS-2LE" conversion
>>>>>>>iconv.c:443:tds_iconv_info_init: client charset name "1252"
>>>>>>>unrecognized
>>>>>>>net.c:225:Connecting to 10.1.0.163 port 1433 (TDS version 7.0)
>>>>>>>net.c:281:tds_open_socket: connect(2) returned "WSAEWOULDBLOCK:
>>>>>>>Resource temporarily unavailable."
>>>>>>>net.c:321:tds_open_socket() succeeded
>>>>>>>util.c:156:Changed query state from DEAD to IDLE
>>>>>>>login.c:771:quietly sending TDS 7+ login packet
>>>>>>>token.c:328:tds_process_login_tokens()
>>>>>>>util.c:331:tdserror(003D42A8, 003D43A8, 20017, 0)
>>>>>>>util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
>>>>>>>util.c:384:tdserror: returning TDS_INT_CANCEL(2)
>>>>>>>util.c:156:Changed query state from IDLE to DEAD
>>>>>>>token.c:337:looking for login token, got 0()
>>>>>>>token.c:122:tds_process_default_tokens() marker is 0()
>>>>>>>token.c:125:leaving tds_process_default_tokens() connection dead
>>>>>>>login.c:462:login packet accepted
>>>>>>>util.c:331:tdserror(003D42A8, 003D43A8, 20002, 0)
>>>>>>>util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
>>>>>>>util.c:384:tdserror: returning TDS_INT_CANCEL(2)
>>>>>>>mem.c:615:tds_free_all_results()
>>>>>>
>>>>>> Are you able to connect to the machine/port with telnet?
>>>>>> Do you running any firewall on the Adaptive Server machine?
>>>>>> What client solution are you using: ODBC, ct-lib or db-lib?
>>>>>>
>>>>>> For an Sybase Adaptive Server you can use TDS 5.0 protocol, but thats
>>>>>> not
>>>>>> really important here. You need to have a connection.
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>>>_______________________________________________
>>>>>>>FreeTDS mailing list
>>>>>>>FreeTDS AT lists.ibiblio.org
>>>>>>>http://lists.ibiblio.org/mailman/listinfo/freetds
>>>>>>
>>>>>> _______________________________________________
>>>>>> FreeTDS mailing list
>>>>>> FreeTDS AT lists.ibiblio.org
>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>>>>>
>>>>
>>>> _______________________________________________
>>>> FreeTDS mailing list
>>>> FreeTDS AT lists.ibiblio.org
>>>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>>>
>>> _______________________________________________
>>> FreeTDS mailing list
>>> FreeTDS AT lists.ibiblio.org
>>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>>
>
>
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
ikorot, 07/28/2010
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
Frediano Ziglio, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, Zhouhua Li, 07/29/2010
- <Possible follow-up(s)>
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
ikorot, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, Zhouhua Li, 07/29/2010
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
ikorot, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, Zhouhua Li, 07/29/2010
- Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83, ikorot, 07/29/2010
-
Re: [freetds] tsql:Adaptive Server connection failed with MinGW Build of FreeTDS 0.83,
Frediano Ziglio, 07/29/2010
Archive powered by MHonArc 2.6.24.