从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'"
据我所知,资源管理器应该以正确的方式在每个数据库中保留一个。
您是否知道任何原因可能触发这种意外行为,导致太多资源管理器(每个资源管理器使用不同的GUID)?
要注意的一件事是,当我们从客户端机器和DB2连接机器上的9.7 FP 9a切换到11.1.4 FP5 Db2驱动程序时,此行为开始。
如果已将驱动程序(就地升级安装)从9.7升级到11.1,请尝试重新安装驱动程序(卸载,新安装,目录节点和db(如果需要)以及自定义配置)。从9.7升级可能会导致配置不正确,从而可能导致XA事务出现问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句