微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

COM + VB6应用程序:RM_ENLIST_FAILED_TOO_MANY_ENLISTS错误

如何解决COM + VB6应用程序:RM_ENLIST_FAILED_TOO_MANY_ENLISTS错误

从VB6应用程序(Com +)开始的事务中,我遇到一种奇怪的行为, 该旧版应用程序在同一事务中调用对DB2和sqlServer的多个查询
返回的错误是:

[Microsoft][ODBC Driver Manager] Failed to enlist on calling object's transaction query=SELECT COUNT (*) as FOO FROM BAR
          FOR FETCH ONLY WITH UR SorgenteErr: Microsoft OLE DB Provider for ODBC Drivers
9:42:42 AM [2032]: Error: -2147467259

通常 msdtc 日志显示 2 个资源管理器的清单,如下所示:

pid=2440       ;tid=4636       ;time=10/08/2020-10:48:11.404   ;seq=535        ;eventid=RM_ENLISTED_IN_TRANSACTION               ;tx_guid=bed0e21a-c138-4ff0-a94e-3dd819694ef7     ;"TM Identifier='(null)                                            '" ;"resource manager #1002 enlisted as transaction enlistment #1. RM guid = '62f2ad11-5eab-45f9-89d6-53d7488cfb6e'"
pid=2440       ;tid=4636       ;time=10/08/2020-10:48:11.545   ;seq=536        ;eventid=RM_ENLISTED_IN_TRANSACTION               ;tx_guid=bed0e21a-c138-4ff0-a94e-3dd819694ef7     ;"TM Identifier='(null)                                            '" ;"resource manager #1003 enlisted as transaction enlistment #2. RM guid = 'bd440a1c-7334-4170-b1d5-a5c9e25eb1a0'"

在一种情况下,当查询数由于某些应用程序逻辑而增加时,我们正在经历一种奇怪的行为;
通常,应用程序会按预期运行,但是有时资源管理器会奇怪地从 2 开始增加 32 ,从而触发 RM_ENLIST_Failed_TOO_MANY_ENLISTS 错误

attempt to enlist the resource manager Failed because the limit on number of maximum enlistments has been reached.

pid=2440       ;tid=4636       ;time=10/23/2020-10:48:17.810   ;seq=566        ;eventid=RM_ENLISTED_IN_TRANSACTION               ;tx_guid=bed0e21a-c138-4ff0-a94e-3dd819694ef7     ;"TM Identifier='(null)                                            '" ;"resource manager #1033 enlisted as transaction enlistment #32. RM guid = '5596fb4e-6c48-441c-af48-2d17adfb4ea0'"
pid=2440       ;tid=4636       ;time=10/23/2020-10:48:18.092   ;seq=567        ;eventid=RM_ENLIST_Failed_TOO_MANY_ENLISTS        ;tx_guid=bed0e21a-c138-4ff0-a94e-3dd819694ef7     ;"TM Identifier='(null)                                            '" ;"attempt to enlist the resource manager Failed because the limit on number of maximum enlistments has been reached. RM guid = 'e260c743-46b4-4f96-a343-1553bc7974eb'"

据我所知,资源管理器应该以正确的方式在每个数据库中保留一个
您是否知道任何原因可能触发这种意外行为,导致过多的Resource Manager(每个都有不同的GUID)?

要注意的一件事是,当我们从客户端机器和DB2连接机器上的9.7 FP 9a切换到11.1.4 FP5 Db2驱动程序时,此行为就开始了。

解决方法

如果已将驱动程序(就地安装升级)从9.7升级到11.1,请尝试重新安装驱动程序(卸载,新安装,目录节点和db(如果需要)以及自定义配置)。 从9.7升级可能会使配置不正确,从而可能导致XA事务出现问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。