Solved

Linked Server / Inconsistent Metadata

Posted on 2005-02-09
7
2,675 Views
Last Modified: 2012-05-05
I've been getting the following error when attempting to do a 4 part query against my Linked server:

     Server: Msg 7353
     OLE DB provider 'MSDASQL' supplied inconsistent metadata.  An extra column was supplied during execution that was not found at compile time.

The error message then lists the offending field.  

I've dropped and recreated the linked server.  
One more interesting note:  If I create a view that references that linked table such as:

     Create view vPV_SOrder as Select * from OpenQuery(ServerName, 'Select * from PV_SOrder')

and then do a select on that view (Select * from vPV_SOrder), I will not get the error.

Is a 'rebuild' of the schema necessary on the Linked Server side?  SQL Server side?

This table was modified with the additional table, but there were also many other tables that had fields modified that do not return the error.

Thanks for any help.

Bill
0
Comment
Question by:bwarneke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 250 total points
ID: 13272415
Couple things, of course, dropping and recreating the link should resolve the problem, you can also change the "lazy schema" validation:

sp_serveroption 'Your Server Name', 'lazy schema validation', false



Brett
0
 
LVL 3

Assisted Solution

by:Terryute68
Terryute68 earned 250 total points
ID: 13274384
bwarneke,

I also remember this to be a bug. The fix at the time was to create a view just as you did.
Here is an article that may help you fix the problem.

http://www.sqlservercentral.com/columnists/jtravis/changingcolumn.asp

0
 

Author Comment

by:bwarneke
ID: 13275067
Thanks arbert.  I forgot to mention that I had attempted the sp_serveroption setting.  If I set the value to true, I get the following (confusing!) message:

     The 'lazy schema validation' option is ignored in this edition of SQL Server.

We are running SQL 2000 Standard Edition.  Is it available only to Enterprise edition?


0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:bwarneke
ID: 13275087
Thanks for the post Terryute68.  

That looks like it would work for me.  It looks like the script needs to be run against the source DB.  But, my source data is a Progress DB.  I will check their KB to see if something similar is possible.

Thanks.

Bill
0
 
LVL 34

Expert Comment

by:arbert
ID: 13275355
Ouch, that shows updating the system tables anyway--not a good idea.  Did you try to drop and recreate the linked server?
0
 

Author Comment

by:bwarneke
ID: 13276516
Yes.  Same results.
0
 

Author Comment

by:bwarneke
ID: 13287333
The issue is with the Progress DB.  The syscolumns table has an ID field.  There is a gap in the sequence.  This causes the error from SQL Server.

There is a fix.  Drop and re-create the offending table.  The ID fields will be ordered properly when the table is re-created.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CAST issue with SQL 2000 15 44
Incorrect syntax near the keyword 'INNER' 3 38
SQL: Transformation or Pivot 3 36
SQL Server 2012 and core licensing 5 31
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question