OPENDATASOURCE执行远程存储过程,数据插入本地临时表
neihh 2006-02-27 03:28:35 INSERT INTO #TMP1
EXEC OPENDATASOURCE(
'SQLOLEDB',
'Data Source=192.168.1.11;User ID=sa;Password=sa
).hksales.dbo.rep_staffsales '2005','2008','',''
如果执行以上语句,则会出现错误,是否有解决方案允许执行远程存储过程并将过程得到的数据插入到本地的临时表中?多谢!!!
报错信息:
Server: Msg 7391, Level 16, State 1, Line 21
The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].