Openquery - unable to begin a distrubuted transaction

Posted by dc2 on Stack Overflow See other posts from Stack Overflow or by dc2
Published on 2013-11-06T09:21:58Z Indexed on 2013/11/06 9:53 UTC
Read the original article Hit count: 152

I am trying to use open query to run a stored procedure in a remote database, and insert it into a table in my local database:

-- this works
exec remotesvr.sys.dbo.golden_table 'some', 'parameters'

While the above works out, I try the following:

insert into my_local_table
exec remotesvr.sys.dbo.golden_table 'some', 'parameters'

I get a SQL error to the effect of 'unable to begin a distributed transaction'.

Is there any way around this?, i.e. can I execute take the results of a remote stored procedure and put its contents in a local table?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about stored-procedures