six

If you have ever played around with the error_reported Extended Event, then it becomes very obvious that the SQL Server Error Log only logs a tiny fraction of the errors that are thrown by code running on your server. Indeed, many things that it logs are explicit about not even being errors. So, broadly speaking, what determines if an error is worthy of inclusion in the Error Log? Is there some list of errors that qualify? Or is it determined based on some criteria?

1 Answer one

Reset to default
eleven

The name ERRORLOG is historical. It's got all the startup messages, plus the details of all the login failures (which aren't sent to the clients), plus all errors of high severity, plus any raiserror WITH LOG, plus any crashes or access violations, plus various warnings.

So it's basically everything that a DBA might need to know about the health of the instance.

But the error_reported event is fired for every user error, which could be way too verbose to write to the ERRORLOG.

You can see some of the error messages that SQL Server will log by looking at the sys.messages DMV, where is_event_logged = 1 . This does not include informational messages logged by the system.

 SELECT m.* FROM sys.messages AS m WHERE m.language_id = 1033 AND   m.is_event_logged = 1 ORDER BY m.message_id;
one
  • Does the official documentation have a list like yours anywhere? I couldn't find one.
    –  J. Mini
    May 18 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged or ask your own question .