info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



Objects exposing columns with CLR types are not allowed in distributed queries. Please use a pass-through query to access remote object...
by BF (Principal Consultant; Architecture; Engineering)
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)