selecting more fields causes catastrophic failure I have a connection to a linked server from sql server 2012 to pervasive sql.

When I do select field1, field2, field3 from mytable everything works!

However, when I do select field1, field2, field3, field4, ...field10+ from mytable I get this erro message:

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "KSLAP208" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "KSLAP208".


I looked at the logs and this is what it says:

2013-02-08 11:27:30.93 spid55      ***Stack Dump being sent to D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\LOG\SQLDump0049.txt
2013-02-08 11:27:30.93 spid55      SqlDumpExceptionHandler: Process 55 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2013-02-08 11:27:30.93 spid55      * *******************************************************************************
2013-02-08 11:27:30.93 spid55      *
2013-02-08 11:27:30.93 spid55      * BEGIN STACK DUMP:
2013-02-08 11:27:30.93 spid55      *   02/08/13 11:27:30 spid 55
2013-02-08 11:27:30.93 spid55      *
2013-02-08 11:27:30.93 spid55      *
2013-02-08 11:27:30.93 spid55      *   Exception Address = 00000000018F5BBE Module(UNKNOWN+0000000000000000)
2013-02-08 11:27:30.93 spid55      *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
2013-02-08 11:27:30.93 spid55      *   Access Violation occurred reading address 0000000009400090
2013-02-08 11:27:30.93 spid55      * Input Buffer 128 bytes -
2013-02-08 11:27:30.93 spid55      *             select * from [KSLAP208].[C003]..PA_Profile_BASE_1119


I am able to do this same exact select * from a different server without problems!

What's happening here? Is this some kind of 2012 bug or a memory issue?
So you are using Microsoft OLE DB Provider for ODBC (MSDASQL) which is presumably pointing to the ODBC DSN for your Pervasive data source. Since the error is an Access Violation (AV), I'm willing to bet that the AV is raised due to something going wrong in the Pervasive ODBC driver. Since you also mention that this query works from some other machine, can you double check the:


ODBC DSN configuration between the 'bad' machine and the 'good' machine?
The ODBC driver version for Pervasive - is it the same on both 'good' and 'bad' machines?