Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 281633 - Last Review: September 26, 2005 - Revision: 6.4
FIX: SQLOLEDB Provider incorrectly leaves transaction open
This article was previously published under Q281633
BUG #: 58292 (SQLBUG_70)
BUG #: 235846 (SHILOH)
Running a certain sequence of commands involving explicit
transactions and parameters in an application program using the SQLOLEDB
Provider incorrectly leaves an uncommitted transaction open. This can cause
severe blocking and other problems.
Although the SET option 'implicit_transactions' is set to
OFF, the SQLOLEDB Provider is opening an implicit transaction.
MDAC 2.6
To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
300635Â
(http://kbalertz.com/Feedback.aspx?kbNumber=300635/
)
How to obtain the latest MDAC 2.6 service pack
Hotfix
IMPORTANT: Microsoft Data Access Components version 2.6 must be installed
before applying this hotfix.
The English version of this fix should
have the following file attributes or later:
Date Time Version Size File name Platform
-----------------------------------------------------------------
11/22/00 8:43pm 8.00.0225 491,584 Sqloledb.dll Intel
11/22/00 8:43pm 8.00.0225 61,440 Sqloledb.rll Intel
NOTE: Due to file dependencies, the most recent hotfix or feature that
contains the above files may also contain additional files.
To work around this problem, do either of the following:
- Use the OLEDB Provider for ODBC rather than the SQLOLEDB
Provider.
-or- - Put additional transactions around the code that creates
the problem.
Microsoft has confirmed this to be a problem in the
Microsoft OLE DB Provider for SQL Server that is included in Microsoft Data
Access Components (MDAC) versions 2.1, 2.5, and 2.6.
MDAC 2.6
This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1.
MDAC 2.5
This problem was first corrected in the version of Sqlredis.exe that is included with Microsoft SQL Server 7.0 Service Pack 4.
Through tracing the application, you can see in SQL Server
Profiler that the SQLOLEDB Provider is sending the following statements to SQL
Server:
SET FMTONLY ON select ... SET FMTONLY OFF
set implicit_transactions off SET NO_BROWSETABLE OFF
This causes an 'implicit_transaction' being already opened.
When using the OLEDB Provider for ODBC and the SQL Server driver instead, the
exact same Visual Basic/ADO code sends the following statements to SQL Server:
set implicit_transactions off SET NO_BROWSETABLE OFF
SET FMTONLY ON select ... SET FMTONLY OFF
Thus the FMTONLY SELECT opens an implicit transaction with SQLOLEDB.
However, because the application never opened this transaction, the application
will normally never close it. This transaction will only be closed upon the
next explicit transaction.
APPLIES TO
- Microsoft SQL Server 7.0 Standard Edition
- Microsoft SQL Server 2000 Standard Edition
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
| kbhotfixserver kbqfe kbbug kbfix kbmdac260sp1fix kbqfe KB281633 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate