最近再用SSIS作数据归档,里面用到了分布式事务。在开发阶段是在一台计算机上运行只要是启动分布式服务就没什么问题,但是昨天把它部署到uat的时候遇到问题,错误信息是:html
最后找到解决方案:node
请注意,若是你们的环境和我同样不在域里面,请选中不要求进行验证。否者在运行分布式事务时远程计算机会提示“此事务已明地或暗地被确认或终止 ”。(计算机名称必定要能ping通,不然回报相同的错误), 注意xp系统下通常是ping不通的数据库
是由于防火墙禁止了icmp数据包.
具体查看:
开始-控制面板-防火墙-高级-ICMP-设置.容许了就能够ping通了服务器
ps:分布式
1.还发现一个问题,数据库也须要开启分布式事务的支持:右键“服务器链接”的属性,在打开的属性窗口选择“链接”,在窗口右侧,勾选“须要将分布式事务用于服务器到服务器的通讯”,肯定便可。this
2.须要打开分布式的端口,端口号是135,或者添加System32下msdtc.exe的例外(netsh firewall set allowedprogram %windir%/system32/msdtc.exe MSDTC enable )。spa
以上是在xp中,如下是win8中防火墙设置(入站规则和出站规则都须要设置)rest
若是此事务已明地或暗地被确认或终止 问题尚未解决能够参考如下设置:htm
To get rid of this error just follow these steps to configure the registry key and REBOOT the machine.blog
1. Click Start, click Run, type Regedit, and then click OK.
2. Locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT
3. On the Edit menu, point to New, and then click Key.
Note If the RPC registry key already exists, go to step 5.
4. Type RPC, and then press ENTER.
5. Click RPC.
6. On the Edit menu, point to New, and then click DWORD Value.
7. Type RestrictRemoteClients, and then press ENTER.
8. Click RestrictRemoteClients.
9. On the Edit menu, click Modify.
10. In the Value data box, type 0, and then click OK.
Note To enable the RestrictRemoteClients setting, type1.
11. Close Registry Editor and restart the computer.
RESTRICTING THE DCOM PORT RANGE
1. Go to Start -> Run. Type in DCOMCNFG.
2. Go to the properties of the My Computer node under the Computers folder underneath Component Services.
3. Under the My Computer Properties look under the Default Protocols tab.
4. Over there make sure that Connection-oriented TCP/IP is selected and then click on Properties.
5. You will see a window like this
If you don’t see a range above and the window looks exactly like the one above, that would mean that the DCOM port range is not configured on the machine.
You can click Add in the above window and type the range (let's say as 5000-5100) and say Ok. Make sure it looks like this. (Both the radio buttons should be selected for Internet Range)
参考地址http://www.cnblogs.com/nzperfect/archive/2011/11/03/2234595.html
3.在事务中,即便存在嵌套的状况,同一个事务内的全部数据库链接对数据都是可访问的。