info@techdevops.com
TechDevOps.com
Explore Tools
Experts in Microsoft SQL Server Operations, Performance, Replication, Cloud & Migrations



Objects exposing columns with CLR types are not allowed in distributed queries. Please use a pass-through query to access remote object...
by BF (Senior MSSQL Operations - Enterprise, Cloud, Strategy)
2016-10-07









Query: Insert records into a table from a linked server select query

Truncate Table CLIENTS
Insert into CLIENTS
Select * from [LinkedServerName].SALESDB.dbo.CLIENTS


Error:

Objects exposing columns with CLR types are not allowed in distributed queries. Please use a pass-through query to access remote object '"SALESDB"."dbo"."CLIENTS"'.


Solution:

Truncate Table CLIENTS
Insert into CLIENTS
Select * from OPENQUERY([LinkedServerName],'SELECT * FROM dbo.CLIENTS')




Resources:

OPENQUERY (Transact-SQL)