Microsoft KB Archive/174512

= FIX: A Stored Procedure or Trigger May Cause Error 707 or an Access Violation =

Article ID: 174512

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Service Pack 1

-



This article was previously published under Q174512



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: kbbug kbfix kbusage KB174512

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.