FIX: A Stored Procedure or Trigger May Cause Error 707 or an AV

Last reviewed: December 19, 1997
Article ID: Q174512
The information in this article applies to:
  • Microsoft SQL Server, version 6.5 Service Pack 1
BUG #: 16929

SYMPTOMS

If a stored procedure or trigger is created that does not contain active code (which means it only contains comments and/or DECLARE statements), SQL Server may stop responding. In addition, the following error may appear in the errorlog:

   Error message 707 severity 20 System error detected during attempt to
   free memory at address 0x%lx.

After the message appears in the errorlog, SQL Server will stop responding and become inaccessible. Instead of the error message, SQL Server may experience a handled access violation, which also causes the server to stop responding. This will appear in the errorlog as the following message, followed by a stack trace:

   97/06/18 09:25:21.89 spid293  EXCEPTION_ACCESS_VIOLATION raised,
   attempting to create symptom dump
   97/06/18 09:25:21.91 spid293  ***BEGIN STACK TRACE***

WORKAROUND

To avoid this problem, make sure all triggers and stored procedures have some active code other than just DECLARE statements and/or comments.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5 Service Pack 1. This problem was corrected in the latest Microsoft SQL Server 6.5 U.S. Service Pack. For information on obtaining the service pack, query on the following word in the Microsoft Knowledge Base (without the spaces):

   S E R V P A C K

MORE INFORMATION

The error only occurs after SQL Server has been shut down and restarted. The initial creation of the stored procedure or trigger will function correctly until SQL Server is shut down and restarted. The type of error received depends on how large the procedure cache is for SQL Server. A procedure cache that is below 30 MB total size usually causes error message 707. Larger procedure caches above 30 MB generally cause the access violation. Note that this problem is a regression, and does not occur on the released version of SQL Server 6.5 (build 201).


Additional query words: hang hung shutdown AV golden sp sp1
Keywords : kbbug6.50.sp1 SSrvGen kbfix6.50.sp4 kbusage
Version : WINNT:6.5 SP1
Platform : winnt
Issue type : kbbug
Solution Type : kbworkaround


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: December 19, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.