你用什么数据库?oracle是完全可以的

解决方案 »

  1.   

    sql server2000
    你看我的代码有问题吗?!
      

  2.   

    对了,系统显示
    因为OLE DB提供程序‘sqloledb’无法启动分布式事务
      

  3.   

    需要 set XACT_ABORT ONfrom SQL Server Books Online:It is recommended that XACT_ABORT be set ON when executing data modification statements against remote tables in an implicit or explicit transaction. For more information, see Distributed Queries and Distributed Transactions. 
      

  4.   

    当 SET XACT_ABORT 为 ON 时,如果 Transact-SQL 语句产生运行时错误,整个事务将终止并回滚。为 OFF 时,只回滚产生错误的 Transact-SQL 语句,而事务将继续进行处理。编译错误(如语法错误)不受 SET XACT_ABORT 的影响。
    这对于我的问题没有什么作用啊!
      

  5.   

    xzhao:
    我使用的情况,不是在Triggers中触发同步事务,是在insert local table同时执行insert romote table.未用XACT_ABORT时,始终不成功.加上后即成功。
    试一下便知PS: 个人感觉,trigger中操作远程表似乎不是很好,网络故障等影响因素较多,事务较易失败。