ODBC Provider Incorrectly Interprets SQL_DTC_DONE Flag in Distributed Transaction

ID: Q235508


The information in this article applies to:
  • Microsoft Data Access Components versions 2.1, 2.1 (GA), 2.1 SP1
  • Microsoft ODBC Driver for DB2, version 4.0 SP2


SYMPTOMS

When participating in a distributed transaction, the Microsoft OLE DB Provider for ODBC (MSDASQL) interprets values, other than SQL_DTC_DONE, to mean that the current connection is already enlisted in a distributed transaction. However, the transaction has completed, the connection has been recycled and is being reused, and is involved in a completely different transaction.

This behavior occurs primarily when connecting to a DB2 server.


CAUSE

When the Microsoft OLE DB Provider for ODBC calls ITransactionJoin::JoinTransaction, a call is being made to the SQLGetConnectAttr() function with the SQL_COPT_SS_ENLIST_IN_DTC attribute. In the DB2 driver, this returns a value other than SQL_DTC_DONE, and that is interpreted to mean the connection is still involved in a distributed transaction.

Since a connection can only be enlisted in one distributed transaction at a time, this generates a XACT_E_XTIONEXISTS return code and the following error message:

Only one transaction allowed


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next Microsoft Data Access Components Service Pack 2 that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
The English version of this fix should have the following file attributes or later:

   Date      Time    Version      Size    File name     Platform
   -------------------------------------------------------------
   6/9/99            2.10.4209    583KB   msdasql.dll
   6/9/99            2.10.4209     10KB   msdasqlr.dll
   6/9/99            2.10.4209    152KB   msdatl2.dll
   6/9/99            2.10.4209     87KB   msdatt.dll
 

NOTE: If this product was already installed on your computer when you purchased it from the Original Equipment Manufacturer (OEM) and you need this fix, please call the Pay Per Incident number listed on the above Web site. If you contact Microsoft to obtain this fix, and if it is determined that you only require the fix you requested, no fee will be charged. However, if you request additional technical support, and if your no-charge technical support period has expired, or if you are not eligible for standard no-charge technical support, you may be charged a non-refundable fee.

For more information about eligibility for no-charge technical support, see the following article in the Microsoft Knowledge Base:
Q154871 Determining If You Are Eligible for No-Charge Technical Support


WORKAROUND

None.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

This problem no longer occurs in MDAC version 2.1 SP2 and MDAC version 2.5 or later.


MORE INFORMATION

Manual Installation

  1. Quit any applications or services that are using the ODBC provider (MSDASQL.dll). This may include Internet Information Server (IIS), Microsoft Transaction Server (MTS), Microsoft Distributed Transaction Coordinator (DTC), and any ADO or ODBC applications.


  2. Download the hotfix (WrongTrans.exe) into a temporary directory and run it to extract the following files:

    • Msdasql.dll
    • Msdasqlr.dll
    • Msdatl2.dll
    • Msdatt.dll
    • Readme.txt


  3. Locate and rename the current versions of the files listed in step two. These files should exist in the \Program files\Common files\System\ole db folder.


  4. Copy the hotfix files into the same location, and restart your services and applications.


Important Notice for Microsoft Windows 95/98 Users

If you are installing this fix on to a computer running Windows 95 or a computer with the original release of Windows 98, you may need to install the Windows 98 Migration DLL included with this fix. Please carefully read the Migrate_qfe.txt file that is included in the Migration.exe file that is in the download file.

Additional query words: db2 connection distributed transaction error only one allowed XACT_E_XTIONEXISTS

Keywords : kbDatabase kbMDAC kbODBC kbOLEDB kbProvider kbMDAC210fix kbMDAC250
Version : WINDOWS:2.1,2.1 (GA),2.1 SP1,4.0 SP2
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: February 1, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.