FIX: Memory Leak with DB-Library Connection Using TCP/IP or IPX/SPX

This article was previously published under Q236439
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 55725 (SQLBUG_70)
A memory leak can occur after opening a DB-Library connection when the application is using the TCP/IP or IPX/SPX network libraries. This leak persists for each connection to SQL Server through DB-Library even after the connection is closed.
To work around this problem, do either of the following:
  • Keep a single connection open when using DB-Library.

  • Use a different network library, such as named pipes or multiprotocol.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
The memory leak is roughly 4 KB for each DB-Library connection opened to the server.

This problem is specific to the use of the 32-bit DB-Library API, and the problem only occurs when using the TCP/IP or IPX/SPX network libraries.

For an application that uses a single DB-Library connection, the memory leak will hardly be noticeable. But for applications that either connect/disconnect for each query ("make/break connections") or use multiple connections, the problem can be more severe, causing all of the memory on the computer to be consumed.
db lib dblib net netlib multi protocol

Article ID: 236439 - Last Review: 10/21/2013 22:54:23 - Revision: 2.0

  • Microsoft SQL Server 7.0 Standard Edition
  • kbnosurvey kbarchive kbbug kbfix KB236439