In SQL Server, we can create linked server to many other RDBMS. The providers to connect would generally publish by destination RBMS. In this client scenario, they were dealing with linked server to Sybase. Let us learn about the error The OLE DB provider “ASEOLEDB” for linked server “SYBASESERVER” supplied inconsistent metadata for a column.

Here is the query which was tried by the client.

SELECT *
FROM SYBASESERVER.prodxc.dbo.sysobjects

It was failing with below error

Msg 7356, Level 16, State 1, Line 1
The OLE DB provider “ASEOLEDB” for linked server “ALTAIR” supplied inconsistent metadata for a column. The column “versionts”
(compile-time ordinal 20) of object “prodxc.dbo.sysobjects” was reported to have a “DBCOLUMNFLAGS_ISFIXEDLENGTH” of 16 at
compile time and 0 at run time.

Linked Server setup was as below:

  • Destination Server: Sybase Server:  SYBASESERVER:5000
  • Provider: SAP ASE OLE DB Provider

To troubleshoot, I asked them to execute the above query by changing the table name with some other tables within the system catalog.  Interestingly, we were able to successfully execute those queries with no issues.  So, the issue seems to be related to the specific table sysobjects.

Instead of four-part naming, we asked to try below OPENQUERY format of the linked server query.

SELECT *
FROM OPENQUERY([SYBASESERVER], 'SELECT * FROM PRODXC.DBO.SYSOBJECTS')

Later we found that It appears that the Sybase OLE DB MDA provider on the Sybase server were not up to date.

 

WORKAROUND/SOLUTION

  1. Instead of four-part naming, use OPENQUERY
  2. Make sure that drivers on the client and server are up-to-date.

Reference: Pinal Dave (https://blog.sqlauthority.com)

First appeared on SQL SERVER – FIX: Msg 7356, Level 16 – The OLE DB provider “ASEOLEDB” for linked server “SYBASESERVER” supplied inconsistent metadata for a column

 

About the Author

Pinal Dave

Pinal Dave is a Microsoft Technology Evangelist (Database and BI). He has written over 1700 articles on the subject on his blog at http://blog.sqlauthority.com. He is a dynamic and proficient Principal Database Architect who specializes in SQL Server Performance Tuning and has 7+ years of hands-on experience. He holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). He is also Regional Mentor for PASS Asia. Prior to joining Microsoft he was awarded Microsoft MVP award for three continuous years for his contribution in community.

Start the discussion at forums.toadworld.com