Feedback
Did this article resolve your question/issue?

   

Article

Crash when using a synonym to query SQL Server linked server

Information

 
TitleCrash when using a synonym to query SQL Server linked server
URL Namecrash-when-using-a-synonym-to-query-sql-server-linked-server
Article Number000112004
EnvironmentProduct: Connect(64) for ODBC SQL Server Wire Protocol driver
Version: 07.16.0400 (B0412, U0270)
OS: Windows
Database: SQL Server
Application: All supported applications
Question/Problem Description
When using four part naming or a synonym to access a SQL Server linked server using static cursors, a crash occurs on a SELECT statement.  
A crash also occurs when using dynamic and keyset cursors.  
A crash does not occur for forward only cursors.
Steps to ReproduceCreate a table on the remote SQL Server database.
create table EMP (
FIRST_NAME char(8),
LAST_NAME char(10),
EMP_ID char(6),
HIRE_DATE datetime,
SALARY float,
DEPT char(4),
EXEMPT int,
INTERESTS text
)

Create a linked server named LINKED to the remote server using the Microsoft OLE DB Provider for SQL Server.

Create a synonym on linked server machine:
CREATE SYNONYM [dbo].[linked_syn] FOR [LINKED].[master].[dbo].[emp]

In ODBC Test, connect to the data source where the linked server is located.
Attr/SQLSetStmtAttr: SQL_ATTR_CURSOR_TYPE=6 (2.0), SQL_CURSOR_STATIC=3 (2.0)
Execute this statement: select * from dbo.linked_syn

Observed results: A crash occurs on SQLExecDirect

Expected results: No crash will occur and data will be returned
Clarifying Information
Error Message
Defect NumberDefect XDBC-9888
Enhancement Number
Cause
The synonym was converted into a four part name and four part naming was not handled by the driver.
Resolution
Fixed in hot fix 07.16.0410 (B0430, U0283).
Refer to article Connect and Connect64 for ODBC hot fix download and install instructions for instructions on how to download and install the hot fix.
Workaround
Notes
Last Modified Date11/20/2020 7:05 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.