Microsoft KB Archive/938102

From BetaArchive Wiki
Knowledge Base


FIX: Error messages when you run a query that references a view in SQL Server 2005 Service Pack 2: “A severe error occurred on the current command. The results, if any, should be discarded”

Article ID: 938102

Article Last Modified on 6/20/2007



APPLIES TO

  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Workgroup Edition



Bug #: 50001256 (SQL Hotfix)

SYMPTOMS

Consider the following scenario. You install Microsoft SQL Server 2005 Service Pack 2 (SP2). You run a query that references a view. In this scenario, you receive the following error messages.

Error message 1


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

Error message 2


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

Additionally, the following error messages are logged in the SQL Server 2005 Errorlog file.

Error message 1


Date Time Server Error: 17310, Severity: 20, State: 1.

Error message 2


Date Time Server A user request from the session with SPID 51 generated a fatal exception.

This problem occurs if the following conditions are true:

  • The query references a view that uses non-ANSI outer join operators. For example, the view uses the *= operator or the =* operator.
  • The column list of the SELECT statement in the view contains a subquery.
  • The version of SQL Server 2005 is SQL Server 2005 SP2 or a later version.
  • You set the database of SQL Server 2005 to use compatibility level 80.


RESOLUTION

Cumulative update information

To resolve this problem, obtain the cumulative update package (build 3175) for SQL Server 2005 SP2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

936305 Cumulative update package 2 for SQL Server 2005 Service Pack 2 is available


WORKAROUND

To work around this problem, modify the view to use ANSI outer join operators. For example, use the LEFT OUTER JOIN operator or the RIGHT OUTER JOIN operator.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Keywords: kbsql2005engine kbexpertiseadvanced kbpubtypekc kbqfe kbfix KB938102