Wednesday 3 September 2008

Knowledge Base Article- SQL Server Assertion Errors

Error Description: SQL Server Assertion: File: , line=1070 Failed Assertion = 'db_mem'. 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.

These assertion errors are related to Replication, The fix for this issue was first released in Cumulative Update 9.

Most of the SQL Assertion Errors are now fixed in Cumulative Update 9, whenever you find assertion Errors in the sql server first check if the server is configured for replication and then check the version of sql server hot fix level .

Following KB Article has the fix for Assertion errors. Not always the cu9 has the fix for the assertion we need to analyze / compare the assertions with fixes in cu9 most of the assertions related to replication are now fixed in sql server 2008 (katmai )

References :
http://support.microsoft.com/kb/956376/
http://support.microsoft.com/kb/953752/LN/
CAUSE
This problems occurs because of an interruption that occurs when the Merge Agent or the Log Reader Agent tries to allocate memory in the sqlservr!repl_add_mem function.
SYMPTOMS
Consider the following scenario. In Microsoft SQL Server 2005, you configure a transactional publication. When you synchronize data, you find that the following error message is logged in Replication Monitor:

Date Time SPID Error: 14151, Severity: 18, State: 1.
Date Time SPID Replication-Replication Transaction-Log Reader Subsystem: agent AgentName failed.
The process could not execute 'sp_repldone/sp_replcounters' on PublisherName .

If you configure a merge publication, you find that the following error message is logged in Replication
Monitor when you synchronize data:

The merge process could not perform retention-based meta data cleanup in database DatabaseName . (Source: Merge Replication Provider, Error number: -2147199467) Get help: http://help/-2147199467 General network error. Check your network documentation.
Additionally, the following error message is logged in the SQL Server 2005 Errorlog file:
Date Time SPID * BEGIN STACK DUMP:
Date Time SPID * Date Time SPID
Date Time SPID *
Date Time SPID * Location: repltimer.cpp:1070
Date Time SPID * Expression: db_mem
Date Time SPID * SPID: SPID
Date Time SPID * Process ID: ProcessID
Date Time SPID * Error: 17066, Severity: 16, State: 1.
Date Time SPID * SQL Server Assertion: File: , line=1070 Failed Assertion = 'db_mem'. 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.

Date Time SPID Error: 3624, Severity: 20, State: 1.
Date Time SPID 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 QFE from Technical Support.

No comments: