Re: Win64 ODBC driver Linked Server for MSSQL 2012

Frediano Ziglio <[email protected]> Wed, 9 May 2018 18:03:27 +0100
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4c5Me61_AHZHqVYgtskcRPDWz96exJr3kKF1CFY-DqaGw@mail.gmail.com>
2018-05-09 4:43 GMT+01:00 John Kendall <[email protected]>:
>
> I have MS SQL Server 2012 (named CASTOR) running on Windows Server 2012 R2.
> I want to link some servers to it using the FreeTDS ODBC driver.
> I've had success with 3 different licensed ($) ODBC drivers, so I know I'm doing the setup right.
>
> The FreeTDS ODBC driver almost works.  Here's an example select on a linked DSN (named PRODFTDS) created using the FreeTDS ODBC driver:
>
>  select * from PRODFTDS...Movetype
>  Msg 7399, Level 16, State 1
>  Server 'CASTOR', Line 1
>  The OLE DB provider "MSDASQL" for linked server "PRODFTDS" reported an error. The provider reported an unexpected catastrophic failure.
>  Msg 7330, Level 16, State 2
>  Server 'CASTOR', Line 1
>  Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "PRODFTDS".
>   movetype move_desc            move_revenue
>   -------- -------------------- ------------
>
> The table Movetype has 3 columns and their names are correctly returned, but that's all that is returned.
>
> I installed Win32OpenSSL 1.1.0h.  I've used various versions of the ODBC driver from the AppVeyor site, Ramiro's 0.95 branch, and one I compiled myself with mingw.  They all do the same thing.
>

Ramiro's work was integrated in the main repository, you can get some
updated zip files at
https://ci.appveyor.com/project/FreeTDS/freetds/build/1053 for
instance.

> Can anyone verify that they have had success with the FreeTDS Win64 ODBC driver for a MSSQL Linked Server?  Did I miss an important step? inconv maybe?
>
> The SQL Server logs show a stack dump that reports an access violation.  Some of it is shown below.  I can show more if it would be helpful.  I'm not sure how to do a TDSDUMP with ODBC on Windows...
>
> Thanks,
> John
>

I suppose you can use DumpFile ODBC connection attribute registering
the linked server manually (there is sp_addlinkedserver store
procedure to do it, there should be a way to retrieve also the current
connection string, I don't remember much the details, maybe they are
stored in master..sysservers?).

>
>   SqlDumpExceptionHandler: Process 64 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
>   * *******************************************************************************
>   *
>   * BEGIN STACK DUMP:
>   *   05/08/18 20:15:26 spid 64
>   *
>   *
>   *   Exception Address = 000000006F7840B5 Module(tdsodbc+00000000000040B5)
>   *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
>   *   Access Violation occurred writing address 0000000000000090
>   * Input Buffer 70 bytes -
>   *  select * from PRODFTDS...Movetype
>   *
>   *

Maybe you can enable the mini dumps and analyze with Visual Studio?

Frediano