Microsoft KB Archive/274266

= FIX: Data Modification Query with a Distinct Subquery on a View May Cause Error 3624 =

Article ID: 274266

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft SQL Server 7.0 Service Pack 2
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q274266



BUG #: 58279 (SQLBUG_70)

BUG #: 236167 (SHILOH_bugs)



SYMPTOMS
Under the following conditions, a client can receive error 3624 (retail assertion) and the client's connection to SQL Server is terminated:
 * A data modification query contains a subquery.
 * The subquery contains a DISTINCT clause.
 * The subquery references a view that also contains a DISTINCT clause.
 * The query is run with a nested loop join.



SQL Server 2000
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

SQL Server 7.0
To resolve this problem, obtain the latest service pack for SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack

Hotfix
NOTE: The following hotfix was created prior to Microsoft SQL Server 7.0 Service Pack 3.

The English version of this fix should have the following file attributes or later:   Version     File name     Platform --

7.00.905   s70905i.exe   x86 7.00.905   s70905a.exe   alpha NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.



WORKAROUND
Rewrite the query to remove the DISTINCT clause in the subquery.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

SQL Server 2000
This problem was first corrected in SQL Server 2000 Service Pack 1.

SQL Server 7.0
This problem was first corrected in SQL Server 7.0 Service Pack 3.



MORE INFORMATION
The following messages appear in the SQL Server error log file preceded by a stack trace:

2000-08-14 15:13:44.21 kernel SQL Server Assertion: File: , line=720 Failed Assertion = 'm_ecP == Ec'.

2000-08-14 15:13:44.23 spid7 Error: 3624, Severity: 20, State: 1.

A retail assertion is a check for invalid data so that the client can be stopped when it is running with unexpected values.

Keywords: kbbug kbfix kbqfe kbsqlserv2000sp1fix KB274266

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.