FIX: SELECT During UPDATE STATISTICS Can Terminate w/ Msg 814

Last reviewed: April 30, 1997
Article ID: Q134629

The information in this article applies to:
  • Microsoft SQL Server, versions 4.21a and 6.0
BUG# NT: 11144 (6.00)

SYMPTOMS

Queries that run during execution of UPDATE STATISTICS can terminate with Msg 814, Level 20, State 1:

   Keep count of buffer <n> holding logical page <n> in database <db>
   has become negative.

CAUSE

Though rare, you could encounter this problem if the following conditions apply:

- The SELECT statement must include a subquery expression and execute

  a query plan that uses an index referenced in the UPDATE STATISTICS
  command (or indirectly if the entire table is referenced).

- Dedicated Multiprocessor Performance must be ON (Or SMPConcurrency
  must be set to zero on SQL Server version 6.0).

- The server must have three or more CPUs running.

If, after encountering the initial error, execution of other commands that involve tables from the SELECT statement also fails with Msg 814, you may have to restart SQL Server to avoid encountering the error in the future.

WORKAROUND

Run UPDATE STATISTICS prior to or after the query that fails.

-OR-

Drop and recreate affected indexes instead of running UPDATE STATISTICS.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 4.21a and 6.0. This problem was corrected in Service Pack 2 for SQL Server version 6.0. For more information, contact your primary support provider.


Additional query words: sql6 buffer manager Windows NT
Keywords : kbbug4.21a kbbug6.00 kbenv kbfix6.00.sp2 SSrvTran_SQL SSrvWinNT
Version : 4.21a 6.0
Platform : WINDOWS
Issue type : kberrmsg


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