No More Solutions

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

XML Data Type is Not Supported in Distributed Queries

Error: Xml data type is not supported in distributed queries. Remote object '<ServerIP>\<ServerInstance>.<DatabaseName>.<Owner>.<TableName>' has xml column(s).

Problem:
This error occurs when trying to select data from table on different server (using linked server) containing XML data type (even though the column with XML data type is not selected).

Solution:
Create a view on the remote server, and then select the view instead of directly selecting from the table containing XML data type.

e.g.
<ServerInstance> = 10.0.0.101
<DatabaseName> = DB1
<Owner> = dbo
<TableName> = Table1

Instead of using:
SELECT * FROM [10.0.0.101.DB1].dbo.Table1

Create a view on the remote server:
CREATE VIEW vGetTable1
AS
SELECT * FROM dbo.Table1

And call the view:
SELECT * FROM [10.0.0.101.DB1].dbo.vGetTable1
Bookmark and Share

0 comments:

Post a Comment