From ikorot01 at gmail.com Sun Jul 17 02:24:05 2022 From: ikorot01 at gmail.com (Igor Korot) Date: Sun, 17 Jul 2022 01:24:05 -0500 Subject: [freetds] Using freetds to access MS SQL Message-ID: Hi, (Frediano), I am trying to configure the FreeTDS access from my Linux box to the SQL Server tha is running on Windows. This is my odbc.ini part: [code] [freetds_MSSQL] Driver=freeTDS Description=FreeTDS MS SQL Connection Trace=Yes Server=192.168.1.91 Database=draft Port=1433 [/code] And this is my odbcinst.ini part: [code] [freeTDS] Description=FreeTDS Driver Driver=/usr/lib64/libtdsodbc.so FileUsage=1 [/code] On Windows I turned off my Comodo firewall and made sure that Remote Access is turned on on the server. Then I tried to connect with: isql freetds_MSSQL sa And got: [code] Could not SQLConneect [/code] Could you please help? Thank you. On Windows From freddy77 at gmail.com Thu Jul 21 05:53:46 2022 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 21 Jul 2022 10:53:46 +0100 Subject: [freetds] Using freetds to access MS SQL In-Reply-To: References: Message-ID: Il giorno dom 17 lug 2022 alle ore 07:16 Igor Korot ha scritto: > > Hi, (Frediano), > I am trying to configure the FreeTDS access from my Linux box > to the SQL Server tha is running on Windows. > > This is my odbc.ini part: > > [code] > [freetds_MSSQL] > Driver=freeTDS > Description=FreeTDS MS SQL Connection > Trace=Yes > Server=192.168.1.91 > Database=draft > Port=1433 > > [/code] > > And this is my odbcinst.ini part: > > [code] > [freeTDS] > Description=FreeTDS Driver > Driver=/usr/lib64/libtdsodbc.so > FileUsage=1 > > [/code] > > On Windows I turned off my Comodo firewall and made > sure that Remote Access is turned on on the server. > > Then I tried to connect with: > > isql freetds_MSSQL sa > > And got: > > [code] > Could not SQLConneect > [/code] > > Could you please help? > > Thank you. > > On Windows Hi, the way I usually troubleshoot this is 1- verify I can connect with simple telnet or similar. If not I need to open the port or firewall 2- try tsql. It's more direct and I can simply enable logs with TDSDUMP (usually TDSDUMP=stderr ./tsql ...) 3- try upper level tools, maybe enabling tracing (TDSDUMP or ODBC trace) Looking above configuration - make sure isql is picking up these files from these locations. Sometimes I write in ~/.odbc.ini and ~/.odbcinst.ini, it seems most DMs read from these files. - where did /usr/lib64/libtdsodbc.so come from? - usually ODBC trace is better enabled from odbcinst.ini. Regards, Frediano From ikorot01 at gmail.com Thu Jul 28 17:03:15 2022 From: ikorot01 at gmail.com (Igor Korot) Date: Thu, 28 Jul 2022 16:03:15 -0500 Subject: [freetds] SQLDescribeParam() implementation Message-ID: Hi, (Frediano), I am looking at the code of on the GitHuib and I see the implementation but the function is commented out. Is there a reason its not done? I presume it's been written a long time ago, and now it's just a matter of uncommenting and testing. Thank you. P.S.: I can try to see if it performs correctly and maybe add some error checking... From freddy77 at gmail.com Tue Aug 23 13:39:53 2022 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 23 Aug 2022 18:39:53 +0100 Subject: [freetds] SQLDescribeParam() implementation In-Reply-To: References: Message-ID: Il giorno gio 28 lug 2022 alle ore 22:05 Igor Korot ha scritto: > > Hi, (Frediano), > > I am looking at the code of on the GitHuib and I see the implementation > but the function is commented out. > > Is there a reason its not done? > > I presume it's been written a long time ago, and now it's just a matter of > uncommenting and testing. > > Thank you. > > P.S.: I can try to see if it performs correctly and maybe add some > error checking... Hi Igor, as far as I remember, and if nobody managed to commit some code without me seeing it, that function is still a stub. Not that with newer mssql servers would be that hard to do (there's a stored procedure to call that does most of the work). Regards, Frediano From ikorot01 at gmail.com Tue Aug 23 14:05:41 2022 From: ikorot01 at gmail.com (Igor Korot) Date: Tue, 23 Aug 2022 13:05:41 -0500 Subject: [freetds] SQLDescribeParam() implementation In-Reply-To: References: Message-ID: Hi, Frediano, On Tue, Aug 23, 2022 at 12:42 PM Frediano Ziglio wrote: > > Il giorno gio 28 lug 2022 alle ore 22:05 Igor Korot > ha scritto: > > > > Hi, (Frediano), > > > > I am looking at the code of on the GitHuib and I see the implementation > > but the function is commented out. > > > > Is there a reason its not done? > > > > I presume it's been written a long time ago, and now it's just a matter of > > uncommenting and testing. > > > > Thank you. > > > > P.S.: I can try to see if it performs correctly and maybe add some > > error checking... > > Hi Igor, > as far as I remember, and if nobody managed to commit some code > without me seeing it, that function is still a stub. ;-) > Not that with newer mssql servers would be that hard to do (there's a > stored procedure to call that does most of the work). I would guess that this will need to work even with the older version of MS SQL and Sybase servers. That's why I am kind of hesitant to do the implementation - you already know the API, and are familiar with internals. And hence the question about the schedule and possibility of it being implemented. Thank you. > > Regards, > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > https://lists.ibiblio.org/mailman/listinfo/freetds