Microsoft Knowledge Base Email Alertz

Error message when you use the sys.dm_exec_query_plan dynamic management function to return a Showplan in XML format for a Transact-SQL batch: A system assertion check has failed

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 915050 - Last Review: April 6, 2006 - Revision: 2.4

Error message when you use the sys.dm_exec_query_plan dynamic management function to return a Showplan in XML format for a Transact-SQL batch: "A system assertion check has failed"


On This Page

SYMPTOMS

Consider the follow scenario. You use the sys.dm_exec_query_plan dynamic management function to return a Showplan in XML format for a Transact-SQL batch. The query execution plan of the Transact-SQL batch resides in the plan cache. When the size of the Showplan exceeds 1 MB in Microsoft SQL Server 2005 32-bit versions or exceeds 0.5 MB in SQL Server 2005 64-bit versions, the query stops. In this scenario, you receive a SQL Server assertion error message in the error log that is similar to the following:
Error: 17066, Severity: 16, State: 1.
SQL Server Assertion: File: <tmpilb.cpp>, line=3131 Failed Assertion = 'fNoWriters'. 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.
Error: 3624, Severity: 20, State: 1.
A system assertion check has failed. Check the SQL Server error log for details

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
913089  (http://kbalertz.com/Feedback.aspx?kbNumber=913089/ ) How to obtain the latest service pack for SQL Server 2005

WORKAROUND

To work around this problem, run the SET SHOWPLAN_XML ON Transact-SQL statement, and then run the Transact-SQL batch. After you obtain the Showplan for the Transact-SQL batch, run the SET SHOWPLAN_XML OFF Transact-SQL statement. To do this, follow these steps:
  1. In SQL Server Management Studio, connect to the instance of SQL Server 2005.
  2. Click New Query to open a new query editor.
  3. Run the following code.
    SET SHOWPLAN_XML ON
    My_Transact-SQL_batch
    SET SHOWPLAN_XML OFF
    
    Note My_Transact-SQL_batch is a placeholder for the Transact-SQL batch whose Showplan you want to obtain.
Note You have to run the SET SHOWPLAN_XML ON Transact-SQL statement and the SET SHOWPLAN_XML OFF Transact-SQL statement separately from the rest of the code.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft SQL Server 2005 Service Pack 1.

REFERENCES

For more information about the SET SHOWPLAN_XML Transact-SQL statement, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ms187757.aspx (http://msdn2.microsoft.com/en-us/library/ms187757.aspx)
For more information about the sys.dm_exec_query_plan dynamic management function, visit the following MSDN Web site:
http://msdn2.microsoft.com/en-us/library/ms189747.aspx (http://msdn2.microsoft.com/en-us/library/ms189747.aspx)

APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Enterprise X64 Edition
Keywords: 
kbsql2005sp1fix kbsql2005xml kbsql2005presp1fix kbsql2005repl kbexpertiseadvanced kbtshoot kbprb KB915050
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate