hi,
one of our SQL server running SQL server 2008 with SP4 stopped without any reason and the error from the log is:
1) A user request from the session with SPID 64 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
2) SQL Server Assertion: File: <qxcntxt.cpp>, line=1052 Failed Assertion = 'cref == 0'. 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
3) SQL Server is terminating because of fatal exception c0000005. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. Check the SQL error log for any related stack dumps or messages. This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart).
4) Database Engine Instance=SQL01-CDS;Mail PID=8544;Error Message:
1) Exception Information
===================
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 11
LineNumber: 0
Number: -2
Procedure:
Server: 192.168.108.6,1435
State: 0
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Data: System.Collections.ListDictionaryInternal
TargetSite: Void OnError(System.Data.SqlClient.SqlException, Boolean)
HelpLink: NULL
StackTrace Information
===================
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.PostResponse(Response r, Guid convHandle)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.PostResponseIfNeeded(MailInfo mi, Response r)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
As pointed out in the error message:
"this error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. "
The error c0000005 is a memory access violation. The root cause of that was:
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
or in other words, the server simply took too long while trying to get data. This was part of a mail process, which might have a bug (in that it had an unhandled exception).
As far as the "fix":
"This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart)."
Already suggested and done.
"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 "
You've also done the DBCC CHECKDB with no errors, so chances are it was timing related. I'd wait to see if it happens again, and if so:
"Contact Product Support Services with the dump produced in the log directory."
or as Vitor said, post the result of SQLDiag.
Jim.