The information in this article applies to:
BUG #: 54366 (SQLBUG_70) SYMPTOMSA query that contains a large number of predicates that are AND-ed together may cause a stack overflow exception. Several thousand conditions are typically required for this problem to occur, and you may reach a limit on the maximum batch size of your query tool before encountering this situation. Many query tools limit batches to 128 KB, whereas SQL Server 7.0 now accepts a batch size as large as (65536 * network packet size). CAUSE
During optimization, memory for selectivity calculation was being allocated from the stack. This allocation depends on the number of nodes being AND-ed together and can result in a stack overflow. WORKAROUNDTo work around this problem, rewrite the query to reduce the number of AND conditions required. For example, you may be able to rewrite the query as a join. STATUSMicrosoft has confirmed this to be a problem in SQL Server
version 7.0. This problem has been corrected in U.S. Service Pack 1
for Microsoft SQL Server version 7.0. For information about
downloading and installing the latest SQL Server Service Pack, see
http://support.microsoft.com/support/sql/.
MORE INFORMATION
The SQL Server error log will contain an entry similar to the following when the exception occurs:
Additional query words: EXCEPTION_STACK_OVERFLOW language_exec ANDed errorlog error err message msg
Keywords : SSrvErr_Log SSrvGPF SSrvTran_SQL kbbug7.00 |
Last Reviewed: November 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |