MSDTC事务配置

时间:2023-03-09 03:15:35
MSDTC事务配置

最近再用SSIS做数据归档,里面用到了分布式事务。在开发阶段是在一台计算机上运行只要是启动分布式服务就没什么问题,可是昨天把它部署到uat的时候遇到问题,错误信息是:

MSDTC事务配置

最后找到解决方案:

    1. 确认"Distribute Transaction Coordinator"服务在Server和本地都是运行状态。
    2. 在Server上打开 Component Services。 Control Panel –> System and Security –> Administrative Tools –> Component Services.
    3. 展开至 Component Services –> Computers –> My Computer –> Distributed Transaction Coordinator –> Local DTC, 右键,选择Properties。在弹出的Dialog中选择Tab “Security”, 勾选Network DTC Access 等选项,具体设置如下图。
      MSDTC事务配置
    4. 以上的截图是在win8上的,如果你的系统是xp或是2003则有些变化.展开至 Component Services –> Computers –> My Computer 右键,选择Properties。在弹出的Dialog中选择Tab “MSDTC”–>Security Configuration, 勾选"Network DTC Access", "Allow Remote Client",
      "Allow Inbound/Outbound", "Enable TIP" (Some option may not benecessary, have a try to get your configuration) 等选项,具体设置如下图。
      MSDTC事务配置
    5. 确认后会要求重新启动Service。注:如果在后面的步骤做完后,还是无法解决问题,可能需要重启电脑。
    6. 确认DTC不会被你的防火墙阻止。

请注意,如果大家的环境和我一样不在域里面, 请选中不要求进行验证。否者在运行分布式事务时远程计算机会提示“此事务已明地或暗地被确认或终止 ”。