Monday, February 11, 2008

A severe error occurred on the current command message when you run a query against a table that does not have a clustered index in SQL Server 2005

FIX: Error message when you run a query against a table that does not have a clustered index in SQL Server 2005: "A severe error occurred on the current command"

SYMPTOMS
Consider the following scenario. In Microsoft SQL Server 2005, you create a table that has one nonclustered index or more than one nonclustered index. The table does not have a clustered index. In this scenario, you may receive the following error message when you run a query against the table:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

Additionally, you cannot display the estimated execution plan for the query, and a minidump file is generated.

RESOLUTION
The fix for this issue was first released in Cumulative Update 6. For more information about how to obtain this cumulative update package for SQL Server 2005 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:

946608 (http://support.microsoft.com/kb/946608/LN/ ) Cumulative update package 6 for SQL Server 2005 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

937137 (http://support.microsoft.com/kb/937137/LN/ ) The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 2 was released Microsoft SQL Server 2005 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 2 hotfix to an installation of SQL Server 2005 Service Pack 2. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

WORKAROUND
To work around this issue, create a clustered index for the table. Note In some cases, this method may not work around this issue. In these cases, you must apply the cumulative update package that is described in this article.

read more here: http://support.microsoft.com/kb/948525/en-us

No comments: