這工作,返回一個結果:插入到表..高管在鏈接的服務器不工作
exec ('select ''col'', count(1) from test.dbo.[Table1] with (nolock)') at svrA
當我嘗試的結果集插入表:
insert into rowcount_sub (tablename,rowcnt)
exec ('select ''col'', count(1) from test.dbo.[Table1] with (nolock)') at svrA
失敗給這個錯誤:
OLE DB provider "SQLNCLI10" for linked server "svrA" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 1
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "svrA" was unable to begin a distributed transaction.
願意與MSDTC(Microsft Distributed Transaction Coordinator)服務合作嗎?您可以通過services.msc啓動它 – 2010-12-05 19:14:23