FIX: ITypeInfo Interface Leak Occurs When You Use SQL Server OLE Automation Stored Procedures (303115)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions) 8.0

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


Modification Type:MinorLast Reviewed:9/26/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix kbSQLServ2000preSP2Fix KB303115