IBM Support

Microsoft SQL Server Automated Transaction Recovery Limitation in WebSphere Application Server Environment

Troubleshooting


Problem

For Microsoft SQL Server database, if a standalone database crashes or a member database fails over from a primary database to a standby database in a cluster configuration, a database administrator might need to resolve the inflight XA transactions. NOTE: This issue might be applicable to the releases that are earlier than 8.5.5.

Resolving The Problem

This situation might occur when WebSphere Application Server is processing XA transactions that include a Microsoft SQL Server database participant. That Microsoft SQL Server database participant could be a standalone database or a member of a cluster. If the Microsoft SQL Server database crashes or fails over from a primary database to a standby database in a Microsoft SQL Server cluster configuration, it is possible that inflight XA transactions might require resolution in Microsoft SQL Server by a database administrator.

When such a situation occurs, the Application Server console displays the following messages:



[2/20/14 11:17:51:053 CST] 00000139 RegisteredRes E   WTRN0047W: An XAER_RMERR occurred when committing the work on a transaction branch <transaction detail>

The Microsoft SQL Server JDBC client returns an XAER_RMERR error from the connection to the database that has failed. Application Server interprets the XAER_RMERR error according to the XA specification. In this case, the XAER_RMERR error means that although the Microsoft SQL Server database has apparently successfully prepared the transaction, it is now likely to have lost all knowledge of the appropriate transaction branch and does not know whether the transaction's work in the database is completed or not. An heuristic exception occurs and is given to the application. In addition, Application Server logs information on the participants in the transaction in its console, for example:

[2/20/14 11:17:51:053 CST] 00000139 RegisteredRes E   WTRN0087I: XAException encountered during completion phase for transaction <transaction detail>. Local resources follow.
[2/20/14 11:17:51:053 CST] 00000139 JTAResourceBa I   WTRN0090I: XATransactionWrapper@ 7f0c0c4d  XAResource: com.ibm.bpm.svt.jca.outbound.TxXAResource@e628798c  enlisted: trueHas Tran Rolled Back = false  mcWrapper.hashCode()446474233: Vote: commit. Result: commit.
[2/20/14 11:17:51:053 CST] 00000139 JTAResourceBa I   WTRN0088I: XATransactionWrapper@ e4e3e951  XAResource: com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl@310fed6a  enlisted: trueHas Tran Rolled Back = false  mcWrapper.hashCode()103491714 encountered XAException with error code XAER_RMERR.

In this example, Application Server determines the outcome of the XA transaction to be in a mixed state:

•Both Resource Managers voted "commit", which means they both successfully completed the preparation phase of the XA protocol.
•One of the participants reported that it had successfully committed the transaction.
•The other participant returned an XAER_RMERR error message.

At this point in the XA protocol, the XA transaction cannot be automatically resolved by Application Server or with an Application Server restart. Administrator intervention is required to ensure that the transaction in the Microsoft SQL Server database is resolved in the correct manner by performing the "commit" as shown in the example.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"8.5.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
06 June 2019

UID

swg21670362