Thursday, January 11, 2007
Arrrgghh - What a Pain in my You-Know-What
So here I am, running a sync script today to synchronize a remote production database with a local one and BAM! I get hit by a ridiculous (IMO) error. The table has an XML column therefore I cannot write a distributed query!
Msg 9514, Level 16, State 1, Line 2
Xml data type is not supported in distributed queries. Remote object 'dbo.MyTable' has xml column(s).
The silliness is that my query does not reference the XML column at all! Arrrgggh - I can't begin to imagine what sort of logic there is for not allowing me to write a distributed query against the "regular" (non-xml) columns. What a humongous pain...
Msg 9514, Level 16, State 1, Line 2
Xml data type is not supported in distributed queries. Remote object 'dbo.MyTable' has xml column(s).
The silliness is that my query does not reference the XML column at all! Arrrgggh - I can't begin to imagine what sort of logic there is for not allowing me to write a distributed query against the "regular" (non-xml) columns. What a humongous pain...
Comments:
Links to this post:
<< Home
I know this was posted quite a while ago, but I ran into this same problem yesterday, and this entry came up in a Google search. Anyway, I found a sort-of work-around, in that if I ran my import script on the source server (the one with the XML datatype in the table), and made the target server the remote server, my import script ran fine.
You can make a view for the table that has the xml column cast as a varchar column. Then, on the server performing the query, you can cast that column back to an xml column.
Maybe I could do it to NVARCHAR but, changing to VARCHAR might lose some unicode data. No matter - I shouldn't have to do that at all. It's a hack, right? And I just don't understand *why* we have to hack around something like that :(
Post a Comment
Links to this post:
<< Home

