FIX: SQL Profiler May Cause Divide By Zero Exception (198521)



The information in this article applies to:

  • Microsoft SQL Server 7.0

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.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB198521