BUG: Force Index Option Fails with Temporary Tables in St. ProcsLast reviewed: October 21, 1997Article ID: Q175359 |
The information in this article applies to:
9986 (6.0) SYMPTOMSIf the "force index" Optimizer hint is used on a query against a temporary table, the query may fail with the following error:
Error 308 Severity 16 Index %s on table %s (specified in the from clause) does not exist.This error message occurs if both of the following conditions are true:
WORKAROUNDThe stored procedure runs correctly if you EXEC it in the same batch in which the stored procedure is created. However, if you execute the stored procedure from another session, it must be recompiled (as when the server restarts). A more permanent workaround is to submit the SELECT statement within the stored procedure by using the SQL Server 6.0 EXEC feature, rather than a straight SELECT.
STATUSMicrosoft has confirmed this to be a problem in SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: proc
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |