Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Different MTS Transaction Contexts Cause Increase in Connections


View products that this article applies to.

This article was previously published under Q224320

↑ Back to the top


Symptoms

If you are using ADO within components that are running under Microsoft Transaction Server (MTS), and the components have different transactional contexts, additional connections may be opened to database server.

Connections opened in a package with multiple components, some marked transactional, some not, will be stored in the OLE DB Session Pool. However, under some circumstances, connections opened in a component marked as "Requires a Transaction," or "Requires a New Transaction," will have their connections stored in the pool as non-transactional. These connections will not be reused by the application, and will be dropped after the normal 60-second timeout. However, under high-activity conditions, this can cause the database server to run out of available connections.

The easiest way to see this behavior is for a package with three components, each of which just opens a Connection via ADO (or OLE DB), two of which are marked as "Supports Transactions," the third marked as "Requires a Transaction."

The problem does not appear to happen if the transactional contexts are evenly divided: for example, if there is one component set to "Supports Transactions" and one component set to "Requires a Transaction." The problem occurs when there is an imbalance in the contexts, such as having two set to "Supports Transactions" and one set to "Requires a Transaction." This is not fully tested, but may offer an additional workaround.

↑ Back to the top


Cause

The OLE DB Service Component (msdasc.dll) is receiving incorrect information from the MTS Dispenser Manager (mtxdm.dll) as to the condition of the current transactional context. This is causing the OLE DB Service Components to store connections opened in a transactional context in the pool as opened with a non-transactional context. OLE DB Session Pooling will never return a non-transactional connection to a consumer that is marked as transactional. Because of this, OLE DB will believe that there are no connections that currently match the the transactional requirements, and a new connection is generated.

↑ Back to the top


Resolution


This problem was corrected in MDAC 2.1 SP2.

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft Data Access Components (MDAC) Service Pack that contains this hotfix.

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 about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.


The English version of this fix should have the following file attributes or later:
   Date      Time   Version      Size    File name   Platform
   ---------------------------------------------------------
   03/26/99  02:55p 02.10.3926.0   5,392 msdadc.dll     x86
   03/26/99  02:56p 02.10.3926.0   5,392 msdaenum.dll   x86
   03/26/99  02:56p 02.10.3926.0   5,392 msdaer.dll     x86
   03/26/99  02:56p 02.10.3926.0   5,392 msdasc.dll     x86
   03/26/99  02:56p 02.10.3926.0 366,352 oledb32.dll    x86
   03/26/99  02:56p 02.10.3926.0  40,720 oledb32r.dll   x86
   03/26/99  02:56p 02.10.3926.0   5,392 oledb32x.dll   x86

				


NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.




↑ Back to the top


Workaround

In addition to the hotfix described in this article, there are two other possible workarounds for this problem:
  • Set all components in MTS to have the same transactional scope.

  • Disable OLE DB Session Pooling.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem was corrected in MDAC 2.1 SP2.


↑ Back to the top


Keywords: kbhotfixserver, kbado200fix, kbado210fix, kbbug, kbfix, kbmdacnosweep, kboledb210fix, kbqfe, kbqfe, KB224320

↑ Back to the top

Article Info
Article ID : 224320
Revision : 6
Created on : 10/7/2005
Published on : 10/7/2005
Exists online : False
Views : 520