FIX: Full Memory and Cursors Cause AVs, 707, 706, and Spins

Last reviewed: April 9, 1997
Article ID: Q153961
The information in this article applies to:
  • Microsoft SQL Server version 6.5
BUG #: 14828 (6.50) (sqlserver)

SYMPTOMS

A user application that uses engine side cursors in a stored procedure can cause a myriad of problems when available SQL Server system memory becomes full. Usually it starts with error 707:

   System error detected during attempt to free memory at address 0x%1x.
   Please consult the SQL Server error log for more details.

Or Error 706:

   Process %d tried to remove PROC_HDR 0x%lx that it does not hold in Pss.

These are then followed by handled access violations. The access violations can also occur without the 707 or 706 errors. After the access violations, SQL Server will often lock up and become unusable as it goes into a 100 percent CPU spin.

CAUSE

When the SQL Server procedure cache needs to swap out a stored procedure it can incorrectly deallocate the procedure twice. This can cause a memory leak as well as the access violations. This will only occur if the stored procedure is using engine side cursors.

WORKAROUND

Increasing the amount of procedure cache available to SQL Server will reduce the chance of the problem occurring. This can be accomplished by giving SQL Server more memory to use, or by increasing the procedure cache using sp_configure.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.


Additional query words: sp1
Keywords : kbbug6.50 kbfix6.50.sp1 kbnetwork SSrvStProc
Version : 6.5
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.