Microsoft KB Archive/198521

From BetaArchive Wiki
Knowledge Base


FIX: SQL Profiler May Cause Divide By Zero Exception

Article ID: 198521

Article Last Modified on 3/14/2006



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition



This article was previously published under Q198521

BUG #: 53507 (SQLBUG_70)

SYMPTOMS

Under narrow, but unpredictable timing conditions, SQL Server may experience a divide by zero exception which causes the Sqlservr.exe process to stop. No new connections can be made, and current connections are unable to respond. The errorlog will contain a stack trace that contains this error:

Process <processno> generated fatal exception c000008e
EXCEPTION_FLT_DIVIDE_BY_ZERO.


This problem is more likely to occur when running SQL Server Profiler, but a study of the underlying failure mechanism indicates that it can theoretically happen when running other queries.

CAUSE

The problem is caused by a race condition when initializing a local variable, so the exact circumstances cannot be predicted.

WORKAROUND

Before attaching SQL Server Profiler, run this query from any client session:

   set statistics time on
   select 1
   set statistics time off
                

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

232570INF: How to Obtain Service Pack 1 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0


For more information, contact your primary support provider.


Additional query words: prodsql hang hung sql server profiler

Keywords: kbbug kbfix KB198521