Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

How to fix Invalid comparison due to NO COLLATION

14 July,2021 by Tom Collins

Question: Got this message in the SQL Error Logs 

Error: 3624, Severity: 20, State: 1.

A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

SQL Server Assertion: File: <typinfo.cpp>, line = 1092 Failed Assertion = 'false' Invalid comparison due to NO COLLATION.. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.


How can I troubleshoot\fix  ? 

Answer: In the Error log there will probably be a sqldump file reference . The sql dump file will have the full stack dump ,  including the INPUT BUFFER. The INPUT BUFFER will have the sql code or related details to assist. 

According to the Microsoft knowledge base the cause of this error is 

"During the query optimization stage, SQL Server tries to compute cardinalities on intermediate results of various stages of the query, for example, the concatenation. Because the collation conflict resolution takes place at the very end, the query optimizer may be unaware of it and tries to perform the computation of the concatenation cardinality on an input with conflicted collation".

In the link below there is information about the issue and what CU levels required for different versions of SQL Server 

For more details on patching for Microsoft SQL Server check - KB4054398 - FIX: "Invalid comparison due to NO COLLATION" retail assert occurs in SQL Server 2014, 2016, and 2017

Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on How to fix Invalid comparison due to NO COLLATION | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer