Search code examples
sql-serverodbcprogress

How do you remove linked server metadata cache when there are no defined linked servers?


Microsoft Linked Server instances cache metadata for faster query resolution. This does not get properly refreshed when the Progress Database resides on a remote server.

Dropping the Linked Server instance does not remove the metadata cache.

Any new linked server continues to use that old cache from the previous linked server. This is causing an error like this...

The OLE DB provider "MSDASQL" for linked server "ANY NAME" supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time.

This problem did not happen until someone made a schema change on the remote Progress DB. Specifically dropping columns from the table that causes the error above.

I'm using SQL Standard Edition 2012. So, don't ask about lazy schema validation. ;)


Solution

  • Backup the data and drop the offending table in the Progress OpenEdge system. Create a new table and load the data.

    Now, the issues is resolved.

    What's different? There are now no ID gaps in SYSPROGRESS.SYSCOLUMNS or ordinal issues in the Microsoft linked server instances cache metadata.