BUG: Stored Proc Can Cause Thread-Level AV After Dump/Load

Last reviewed: May 2, 1997
Article ID: Q150218
The information in this article applies to:
  • Microsoft SQL Server, version 6.0
BUG#: 14657 (6.00)

SYMPTOMS

If a stored procedure creates a temporary table and executes another stored procedure that creates a temporary table with the same table name, it can cause a thread-level access violation (AV) the first time this stored procedure is executed after the database is dumped and then restored from the dump.

CAUSE

Limited testing has shown that the scenario for reproducing this problem has a narrow scope:

  1. The first stored procedure must create a local temporary table.
2. The second stored procedure that is being executed within the first one
   must create a local temporary table with the same table name as the
   temporary table created in the first stored procedure.
3. These two stored procedures must exist when the database dump was taken.
   Loading the database right after dump, and executing the first stored
   procedure will demonstrate the problem. Subsequent execution of these
   stored procedures will work fine.

WORKAROUND

Do not create a temporary table with the same table name within two stored procedures if one stored procedure needs to call the other one.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: av
Keywords : kbbug6.00 kbprg SSrvProg SSrvStProc
Version : 6.0
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: May 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.