SQL Server 2005 X64 Linked Server error

We useWindows 2003 Server (64) on AMD64 andSQL Server 2005 Developer Edition x64 + SP1

Problem:

I can not execute any sql on a linked server using the native Provider (SQLCLNI)

Example (create a linked server on the same machine, other database (msdb) and try to execute any simple select using OPENQUERY

sp_addlinkedserver @server='ls',@srvproduct='SQLNCLI',@provider='SQLNCLI'

,@provstr='Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=msdb;Data Source=localhost;'

Select*fromOPENQUERY(ls,'Select * from Sysobjects')

Msg 7356, Level 16, State 1, Line 1

The OLE DB provider "SQLNCLI" for linked server "ls" supplied inconsistent metadata for a column. The column "name" (compile-time ordinal 1) of object "Select * from Sysobjects" was reported to have a "Incomplete schema-error logic." of 0 at compile time and 0 at run time.

[4592 byte] By [wernerm.] at [2007-12-24]
# 1
The same happens with me also.
I did tried to change the provider name SQLNCLI TO SQLOLEDB but it seems by default SQLNCLI becomes the provider.

Msg 7356, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI" for linked server "localserver1" supplied inconsistent metadata for a column. The column "ObjectID" (compile-time ordinal 1) of object "select * from datObjects" was reported to have a "Incomplete schema-error logic." of 0 at compile time and 0 at run time.

cool_chandu at 2007-10-8 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 2
The same happens with me also.
I did tried to change the provider name SQLNCLI TO SQLOLEDB but it seems by default SQLNCLI becomes the provider.

Msg 7356, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI" for linked server "localserver1" supplied inconsistent metadata for a column. The column "ObjectID" (compile-time ordinal 1) of object "select * from someObjects" was reported to have a "Incomplete schema-error logic." of 0 at compile time and 0 at run time.

cool_chandu at 2007-10-8 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 3

I'm having the same problem with the following statement. This was testing on server that was upgraded moved to new server (64 bit) and a server that was a fresh install (32 bit).

Select*

FromOpenquery(

yourservername,

'yourdatabasename..sp_stored_procedures'

)

carluman at 2007-10-8 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 4

SQL Server 2005 does redirect the SQLOLEDB provider to the SQLNCLI provider. Could one or more of you please report the problem you're having on https://connect.microsoft.com/SQLServer?

I'm going to try the scenario as well and hopefully report back with more info.

- Vaughn

VaughnWashingtonMSFT at 2007-10-8 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 5

Hi Werner!

Could you send me what your “select @@version” prints?

Could you also look at the version of the following file at your computer:

"%WinDir%\System32\sqlncli.dll"

Please right-click on each of it in Explorer, choose “Properties”, then move to “Version” tab and copy “File Version” and “Platform” items values.

VadimTryshev-Microsoft at 2007-10-8 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 6

I have the same problem with OPENQUERY to a SQL 2005 linked server.

select @@version returns:

Microsoft SQL Server 2005 - 9.00.3054.00 (X64) Mar 23 2007 18:41:50 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

sqlncli.dll version is 2005.90.3042.0

This also fails: select * from [linked_server].[catalog].[schema].[table]

HarlowBurgess at 2007-10-8 > top of Msdn Tech,SQL Server,SQL Server Data Access...

SQL Server

Site Classified