Microsoft KB Archive/303115

= FIX: ITypeInfo Interface Leak Occurs When You Use SQL Server OLE Automation Stored Procedures =

Article ID: 303115

Article Last Modified on 9/26/2005

-

APPLIES TO


 * Microsoft SQL Server 2000 Service Pack 3a

-



This article was previously published under Q303115



BUG #: 354582 (SHILOH_BUGS)



SYMPTOMS
If you run a stored procedure in SQL Server that uses the SQL Server OLE Automation stored procedures sp_OACreate, sp_OAMethod, and sp_OASetProperty to manipulate COM objects, under certain circumstances, you may encounter an ITypeInfo COM interface leak each time that you run the stored procedure. In most cases, each leaked ITypeInfo COM interface will have an associated file handle, and a critical section handle that is leaked.



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

Hotfix
NOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 2.

The English version of this fix should have the following file attributes or later:  Date       Version           Size       File name    Platform --- 06/22/2001 2000.080.0306.00     57,416  Odsole70.dll   x86 06/29/2001 2000.080.0306.01  7,458,877  Sqlservr.exe   x86



WORKAROUND
The only existing workaround is to not use the SQL Server OLE Automation stored procedures to manipulate COM objects.



STATUS
Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000.

This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.



MORE INFORMATION
It is difficult to track ITypeInfo leaks directly without the source code to the affected COM object. Helper functions in Oleaut32.dll can implement the ITypeInfo interface as well as the COM object, which can implement the ITypeInfo interface internally. If the COM object uses the built-in ITypeInfo helper functions of the COM object (and most do), ITypeInfo is implemented by Oleaut32.dll. In this scenario, you can identify the leak by watching for handle leaks. For each Oleaut32.dll-implemented ITypeInfo COM interface that is leaked, you will see one file handle and one critical section handle that is leaked. For additional information about memory and handle leaks that occur when you use MSXML inside SQL Server stored procedures, click the article number below to view the article in the Microsoft Knowledge Base:

303114 FIX: Memory and Handle Leaks Occur When You Use MSXML Inside SQL Server Stored Procedure

Keywords: kbbug kbfix kbqfe kbsqlserv2000presp2fix kbhotfixserver KB303115

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.