Users: 15,000+ | Page Views: 50,000+ | PPS: 2.5
TechDevOps.com
Explore Tools
{Experts in Microsoft SQL Server Operations, Performance, HA/DR, Data Migrations & Cloud Computing}



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)