What can I find out about "'A severe error occurred on the current command"?
I have a stored procedure that I开发者_如何学Python run from a DLL written in C# that I use in an ASP.NET page. Sometimes on the live database, which is running SQL Server 2008, I get the exception "A severe error occurred on the current command. The results, if any, should be discarded.".
I have read about this error message and there seems to be many causes for this error. Is there any way to find out more about the cause of this problem. Is there more info somewhere in the exception that I can use? Is there anything specific that I should look for in the database logs (and where should I look)?
The error is in your stored procedure. You should start looking there. It is probably leaking memory or following a pattern that is exhausting SQL server.
If I recall, this somewhat misleading error can be caused by an uncommitted transaction within the stored procedure. If you have any conditional statements which call BEGIN TRANS
or END TRANS
, you may want to look there.
精彩评论