FIX: Alpha: Access Violations When Executing Query Plans the First Time

ID: Q214596


The information in this article applies to:
  • Microsoft SQL Server version 6.5
    on the following platforms: Alpha

BUG #: 18403; 18404 (SQLBUG_65)

SYMPTOMS

Under very narrow circumstances, the first execution of a query plan (seen mostly with stored procedures, but may also apply to views, and so on) after a restart of SQL Server may cause a handled access violation (AV).

NOTE: This problem only occurs on the Alpha platform; it does not occur on Intel-based processor architectures.

Other items of note include the following:

  • The AV happens on the first execution of certain stored procedures with certain parameters after restarting SQL Server.


  • When running the offending statement recorded by SQL Server's exception handler again, the AV always occurs (that is, it is reproducible).


  • A slight change of the stored procedure or the parameters in the first execution after a restarting the server may cause the AV to disappear until the cached plan is discarded or SQL Server is cycled.



CAUSE

This problem is caused by a bad memory alignment in the procedure cache under very narrow circumstances.


WORKAROUND

To work around this problem, do the following:

  1. Call the stored procedure with "safe" parameters in a startup procedure.


  2. Call the stored procedure with "safe" parameters on a scheduled basis to avoid the "good execution plan" being flushed from the procedure cache.



STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words: sp sp5 sp5a

Keywords : SSrvGPF SSrvStProc kbbug6.50 kbfix6.50.SP5
Version : winnt:6.5
Platform : winnt
Issue type : kbbug


Last Reviewed: November 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.