Linked servers issues

  • I use OPENQUERY statement when accessing MSSQL remote server. But some operations fail due to the unknown reason and following message is logged:

    Server: Msg 7356, Level 16, State 1, Line 1

    OLE DB provider 'SQLOLEDB' supplied inconsistent metadata for a column. Metadata information was changed at execution time.

    OLE DB error trace [Non-interface error: Column 'Login' (compile-time ordinal 2) of object 'DECLARE @iResult int;

    exec usp_LoadUsers 0,0,@iResult OUTPUT;' was reported to have a DBTYPE of 129 at compile time and 130 at run time].

    This procedure can perform various actions and execute different queries depending on input parameters.

    I tried to re-created and re-compile stored procedure usp_LoadUsers with no success.

  • Are you on SP2 or SP3? If not, the following article might apply:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;306401

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • Thanks a lot, bkelley!

    But I have SP3 installed. I ran few tests and found out:

    1)If 'rpc out' option is enabled the following statement is successfully executed:

    'exec ClientServer.DB.dbo.usp_LoadData @Param' with any @Param supplied.

    2)The following statement 'SELECT * from OPENQUERY(ClientServer,'exec usp_LoadData @Param')' is executed successfully only if result set related to the first query in the stored procedure is returned. All other result sets(other parameter values) raise error:

    Server: Msg 7355, Level 16, State 1, Line 1

    OLE DB provider 'SQLOLEDB' supplied inconsistent metadata for a column. The name was changed at execution time.

    OLE DB error trace [Non-interface error: OLE DB provider returned different names for a column: ProviderName='SQLOLEDB', CompileTimeColumnName='Column1', RunTimeColumnName='Column2', Rowset=exec usp_LoadData 3;].

    Is it OLEDB error or MSSQL bug ? These various error messages force me confuse ...

  • i encountered the same meta data inconsistent error.  I have a SQL 2000 added in my SQL 7 as linked server.

    Does anyone know how to mitigate the error?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply