FIX: A Memory Leak Occurs When Cursors Are Opened During a Connection

This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 362971 (SHILOH_BUGS)
When you close a database connection, a memory leak occurs if the client application made a call during the connection that caused a server cursor to open. For example, a server cursor opens when the sp_cursoropen stored procedure is called.

In severe cases, the client application may receive out-of-memory errors, such as
Msg 17803: Insufficient memory available.
Msg 701: There is insufficient system memory to run this query.
or the error log file may contain a message that is similar to the following one:
Buffer Distribution: Stolen=203317 Free=333 Procedures=161
Inram=0 Dirty=16283 Kept=0
I/O=0, Latched=479, Other=450547
Buffer Counts: Commited=671120 Target=671120 Hashed=347309
InternalReservation=667 ExternalReservation=1299 Min Free=512
Procedure Cache: TotalProcs=36 TotalPages=161 InUsePages=79
Dynamic Memory Manager: Stolen=203310 OS Reserved=1664
OS Committed=1635
OS In Use=1599
Query Plan=204 Optimizer=120
Utilities=49 Connection=223
Global Memory Objects: Resource=1984 Locks=289
SQLCache=101 Replication=2
LockBytes=2 ServerGlobal=43
Query Memory Manager: Grants=2 Waiting=0 Maximum=2229 Available=762
The small leak occurs only when you disconnect.

Service pack information

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 How to obtain the latest SQL Server 2000 service pack

Hotfix information

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date		Time	Version		Size		Filename-----------------------------------------------------------------------------------------------------01-Jul-2002	20:07			10,794		Sp2_qfe_serv_uni.sql01-Nov-2002	00:01	2000.80.696.0	7,467,089	Sqlservr.exe
NOTE: Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.

Article ID: 810052 - Last Review: 02/27/2014 18:42:51 - Revision: 5.4

Microsoft SQL Server 2000 Developer Edition, Microsoft SQL Server 2000 Standard Edition, Microsoft SQL Server 2000 Enterprise Edition, Microsoft SQL Server 2000 Personal Edition, Microsoft SQL Server 2000, Workgroup Edition, Microsoft SQL Server 2000 Desktop Engine (Windows), Microsoft SQL Server 2000 Enterprise Edition 64-bit

  • kbnosurvey kbarchive kbhotfixserver kbqfe kbqfe kbsqlserv2000presp4fix kbfix kbbug KB810052