IBM Support

Creating XA connection on Windows with MSDTC may return SQL0998N

Troubleshooting


Problem

During the execution of the testcon20 or testconn40 program with the "-dtc" option, an error occurs while creating the XA connection. The error is "SQL0998N Error occurred during transaction or heuristic processing. Reason Code = "16". Subcode = "2-FFFFFFFF80004005".".

Symptom

1) You might get error messages in the db2diag.log


2014-04-21-12.24.43.626000-240 I3739F406 LEVEL: Severe
PID : 4432 TID : 8140 PROC : testconn20.exe
INSTANCE: DB2 NODE : 000
APPID : 109.109.109.109.690637.140421162441
EDUID : 8140
FUNCTION: DB2 UDB, XA DTP Support, MicrosoftXARMCreate, probe:364
DATA #1 : String, 69 bytes
HRESULT: 80004005
HRESULT Message: Unspecified error

ITransaction:

2014-04-21-12.24.43.626000-240 I4147F748 LEVEL: Info
PID : 4432 TID : 8140 PROC : testconn20.exe
INSTANCE: DB2 NODE : 000
APPID : 109.109.109.109.60637.140421162441
EDUID : 8140
FUNCTION: DB2 UDB, oper system services, sqlofica, probe:10
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -998 sqlerrml: 21
sqlerrmc: 16 2-FFFFFFFF80004005
sqlerrp : SQLXACOM
sqlerrd : (1) 0x00000000 (2) 0x00000010 (3) 0x00000000
(4) 0x00000003 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 58005


2) You are able to reproduce the error by running testconn utility with -dtc option:

testconn40 -dtc "database=dbName;server=serverName:portNumber;uid=userName;pwd=password"

Adding the MSDTC step:


Step 1: Printing version info
.NET Framework version: 2.0.50727.5477
64-bit
DB2 .NET provider version: 9.0.0.2
DB2 .NET file version: 9.7.5.2
Capability bits: ALLDEFINED
Build: 20111018
Factory for invariant name IBM.Data.DB2 verified
Factory for invariant name IBM.Data.Informix verified
IBM.Data.Informix from DbFactory is the Common Informix .NET provider
Elapsed: 0.6084117

Step 2: Validating db2dsdriver.cfg against db2dsdriver.xsd schema file
File C:\ProgramData\IBM\DB2\DB2COPY1\cfg\db2dsdriver.cfg missing. Nothing to validate
Elapsed: 0

Step 3: Connecting using "database=dbName;server=serverName:portNumber;uid=userName;pwd=password"
Server type and version: OS/390 10.01.0005
Elapsed: 2.028039

Step 4: Selecting rows from SYSIBM.systables to validate existence of packages


SELECT * FROM SYSIBM.systables FETCH FIRST 5 rows only
Elapsed: 0.3276063

Step 5: Calling GetSchema for tables to validate existence of schema functions
Elapsed: 3.1512606

Step 6: Creating XA connection


DB2TransactionScope: Failed to open connection to database!
IBM.Data.DB2.DB2Exception: ERROR [58005] [IBM][DB2] SQL0998N Error occurred during transaction or heuristic processing. Reason Code = "16". Subcode = "2-FFFFFFFF80004005".
at IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, String& szConnectionString, DB2ConnSettings& ppSettings, Object& ppConn)
at IBM.Data.DB2.DB2Connection.Open()
at TestConn.DB2TransactionScope.Open(String connstr)

Looking for XADLL key for C:\Program Files\IBM\SQLLIB\bin\db2app.dll
Correct entry found
Check if XA Transactions are enabled:
Windows 7, 2008, Vista -
Component Services, Computers, My Computer,
Distributed Transaction Coordinator, Local DTC
Properties, Security tab, Enable XA Transactions
Other windows versions -
Component Services, Computers, My computer, Properties
MSDTC tab, Security configuration, Enable XA Transactions


Test failed.

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m0z000000cwrqAAA","label":"Programming Interface-\u003EXA\/2PC"}],"ARM Case Number":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Versions"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
01 May 2025

UID

swg21673341