FIX: Memory and Handle Leak When You Use MSXML Inside SQL Server Stored Procedure (303114)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q303114
BUG #: 354594 (SHILOH_BUGS)

SYMPTOMS

If you use Microsoft XML (MSMXL) inside a SQL Server stored procedure through the SQL Server OLE automation stored procedures (sp_OACreate, etc...), and use a client application that opens and closes connections and executes the stored procedure, you will see a persistently rising handle and memory leak inside of SQL Server.

If you open a single connection to SQL Server, and call the exact same stored procedure over and over, you do not see any handle or memory leaks.

RESOLUTION

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

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

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

300635 INFO: How to Obtain the Latest MDAC 2.6 Service Pack

WORKAROUND

Microsoft does not recommend that you use MSXML inside of a SQL Server stored procedure via the SQL Server ole automation stored procedures. Rather, use the built-in XML features that SQL Server 2000 provides and are detailed in SQL Server 2000 books online.

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 first corrected in Microsoft SQL Server 2000 Service Pack 2 and MDAC 2.6 Service Pack 2.

Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbbug kbfix kbmdac260sp2fix kbSQLServ2000preSP2Fix KB303114