Это работает, возвращая набор результатов:
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.