Usage Note 13150: "Segmentation violation in task SQL" issued accessing Microsoft SQL Server using SAS/ACCESS Interface to ODBC
The following error message as well as "table not found" error may be
issued when submitting a regular select query (i.e. select * from
table_name) using SAS/ACCESS Interface to ODBC accessing Microsoft SQL
Server using the FreeTDS ODBC driver.
Segmentation Violation In Task ( SQL ]
Fault and traceback information not available
Task Traceback
However, substituting an ODBC special query (i.e. ODBC::SQLTables) for
the regular query works fine.
The cause for "table not found" and segmentation violation errors are
one in the same: the FreeTDS driver does not support calling
SQLNumResultCols after SQLPrepare. It only supports calling it after
SQLExecute or SQLExecDirect.
So, when SAS calls SQLNumResultCols after preparing "select * from
table", we get back a column count of 0. This is extremely unusual when
the statement in question is a SELECT and the table exists in the
database. Since we get back 0, we don't create any column metadata for
the table, which causes the subsequent errors and segv.
We have never seen a driver that exhibits this behavior and we're not
the first ones to run into this. Here's an article from the FreeTDS
archives:
http://lists.ibiblio.org/pipermail/freetds/2004q1/015717.html
To resolve this problem, our recommendation would be to obtain the ODBC
drivers from another source, i.e. DataDirect/Merant which we have tested
with thoroughly. Another alternative would be to contact FreeTDS and
pressure them for a fix to what seems to be abnormal driver behavior.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to ODBC | 64-bit Enabled HP-UX | 9.1 TS1M3 | |
64-bit Enabled Solaris | 9.1 TS1M3 | |
HP-UX IPF | 9.1 TS1M3 | |
Linux | 9.1 TS1M3 | |
Solaris for x64 | 9.1 TS1M3 | |
Tru64 UNIX | 9.1 TS1M3 | |
64-bit Enabled AIX | 9.1 TS1M3 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Date Modified: | 2008-03-04 14:21:39 |
Date Created: | 2004-08-25 00:00:00 |