不同服务器之间数据插入

kingways 2011-05-04 11:22:22
我有两个数据库服务器
其中一个是本地服务器A
另一个是远程连接服务器B
我使用连接服务器查询出来的数据插入到本地服务器中去
但是查询可以查询出数据
可是插入却总提示错误

insert into report_col(A 数据库表)
select * from [B].[fy_erp_test].dbo.report_col
where tblname not in ( select tblname from report_col )

错误提示为:
[OLE/DB provider returned message: 新事务不能登记到指定的事务处理器中。 ]
OLE DB 错误跟踪[OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a]。
消息 7391,级别 16,状态 1,第 1 行
该操作未能执行,因为 OLE DB 提供程序 'SQLOLEDB' 无法启动分布式事务。
...全文
76 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Shawn 2011-05-04
  • 打赏
  • 举报
回复
http://ycyshmin.blog.163.com/blog/static/32402732200862194615467/
insert into report_col(数据库表字段列表)
select * from [B].[fy_erp_test].dbo.report_col
where tblname not in (select tblname from report_col)

22,209

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧