FIX: Cursors That Have a Long Lifetime May Cause Memory Fragmentation

This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 363153 (SHILOH_BUGS)
This hotfix includes the files required to prevent or resolve the W.32 Slammer worm.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
813440 Virus Alert About the W32.Slammer Worm
If you open cursors and keep them open for a long time while other queries are running on the same connection, allocation patterns may fragment memory. Under certain circumstances, memory fragmentation might cause the following symptoms:
  • Spurious out-of-memory errors.

  • The following message is logged in the SQL Server error log:
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 General=122887 Utilities=49 Connection=223
Global Memory Objects: Resource=1984 Locks=289 SQLCache=101 Replication=2 LockBytes=2 ServerGlobal=43 Xact=120037
Query Memory Manager: Grants=2 Waiting=0 Maximum=2229 Available=762
In the error case, the values for OS Reserved, OS Committed and OS In Use are high, typically 20,000 or greater. However, many other reasons can cause these values to be high. For a definitive diagnosis of this bug, have a Microsoft Support Professional perform additional analysis by using a dump file of the process.

For this problem to occur, the cursor must do something that requires memory allocations greater than 8 KB. This is typically limited to a small subset of cursor activity.

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    File name   --------------------------------------------------------------   19-Nov-2002  19:50  2000.80.703.0   7,471,185  Sqlservr.exe        18-Jan-2002  04:45  2000.80.568.0      29,244  Dbmslpcn.dll        18-Jan-2002  04:45  2000.80.568.0      29,244  Ssmslpcn.dll     				
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: 810526 - Last Review: 02/27/2014 18:43:01 - Revision: 4.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 KB810526