Article ID: 184478 - Last Review: March 14, 2006 - Revision: 4.0

FIX: Repeated DBCC DBREINDEX Causes Stack Overflow Error

This article was previously published under Q184478
BUG #: 17957 (SQLBUG_65)
16706 (SQLBUG_65)
Expand all | Collapse all

SYMPTOMS

Running DBCC DBREINDEX in a loop against many tables, including some without any indexes, may cause the connection to stop responding and the following errors to be reported in the errorlog:
98/03/30 21:50:36.17 spid10 ex_testhandle: stack overflow, top=05F2D860, end=05F2D860

98/03/30 21:50:36.17 spid10 Recursive error 900 in ex_print

98/03/30 21:50:36.18 spid10 Original error was 2528, severity 10, state 1

CAUSE

The problem only occurs when a number of the tables have no indexes.

WORKAROUND

To work around this problem, do one of the following:
  • Do not run DBCC DBREINDEX against tables with no indexes.

    -or-
  • Use an EXECUTE statement around the DBCC DBREINDEX command within the loop.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:
197177  (http://support.microsoft.com/kb/197177/ ) INF: How to Obtain SQL Server 6.5 Service Pack 5a
For more information, contact your primary support provider.

MORE INFORMATION

When the connection stops responding, it is usually still possible to cancel it from the client.

With some combinations of indexes on the tables, this may also result in an access violation (AV) that closes the connection.

APPLIES TO
  • Microsoft SQL Server 6.5 Standard Edition
Keywords: 
kbbug kbfix KB184478
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations