在 DTC 事务中登记 SSIS 包的间歇性失败 [英] Intermittent failure to enlist SSIS package in DTC transaction
问题描述
我们的软件包随机失败并显示以下错误消息:
Our packages are randomly failing with the following error message:
SSIS 错误代码 DTS_E_OLEDBERROR
.发生 OLE DB 错误.错误代码:0x8004D00A.COM 错误对象信息可用.来源:[Some Package Name]"错误代码:0x8004D00A 描述:SSIS 运行时未能登记 OLE DB 连接在分布式事务中,错误为 0x8004D00A无法在事务中登记."
SSIS Error Code
DTS_E_OLEDBERROR
. An OLE DB error has occurred. Error code: 0x8004D00A. COM error object information is available. Source: "[Some Package Name]" error code: 0x8004D00A Description: "The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D00A "Unable to enlist in the transaction."
这种情况不会一直发生,重新运行包通常会成功,所以我认为这不是 DTC 或网络配置问题.无论我们是在 Studio 中还是通过 SQL 代理作业运行包,都会发生这种情况.在后一种情况下,包在它尝试连接的同一个 SQL Server 实例上运行.
This doesn't happen all the time, and re-running the package often succeeds, so I don't think it's a DTC or network config problem. This happens whether or not we're running the package from within Studio or by a SQL Agent Job. In the latter case, the package is running on the same SQL Server instance that it is trying to connect to.
我们可以从日志中看到事务在正确的点开始 - 但几秒钟后,我们得到了失败.
We can see from the logs that the transaction is being started at the correct point - but a couple of seconds later, we get the failure.
非常感谢此时收到的任何建议!
Any suggestions gratefully received at this point!
SQL Server 详细信息:在 Server 2003 64 位企业版 (3790) 上运行的 64 位企业版 (v9.0.3233).服务器运行 E5345 Xeons,具有 6GB 内存.
SQL Server Details: 64-bit Enterprise Edition (v9.0.3233) running on Server 2003 64-bit Enterprise (3790). The servers are running E5345 Xeons, with 6GB of RAM.
推荐答案
我们最终找到了答案——控制流中有两个独立的任务正在建立与同一个数据库的连接.显然,某处存在一些竞争条件使其失败.添加优先约束以强制任务串行执行使问题消失.
We found the answer in the end - there were two independent tasks in the control flow that were establishing connections to the same database. Evidently there is some race condition somewhere that makes it fail. Adding a precedence constraint to force the tasks to be executed in series made the problem go away.
这篇关于在 DTC 事务中登记 SSIS 包的间歇性失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!