Partilhar via


Monitoring the Error Logs

SQL Server logs certain system events and user-defined events to the SQL Server error log and the Microsoft Windows application log. Both logs automatically timestamp all recorded events. Use the information in the SQL Server error log to troubleshoot problems related to SQL Server.

The Windows application log provides an overall picture of events that occur on the Windows operating system, as well as events in SQL Server and SQL Server Agent. Use the Windows Event Viewer to view the Windows application log and to filter the information. For example, you can filter events, such as information, warning, error, success audit, and failure audit.

Comparing Error and Application Log Output

You can use both the SQL Server error log and the Windows application log to identify the cause of problems. For example, while monitoring the SQL Server error log, you may encounter error messages that do not contain cause information. By comparing the dates and times for events between these logs, you can narrow the list of probable causes. The SQL Server Management Studio Log File Viewer lets you integrate SQL Server, SQL Server Agent, and the Windows logs into a single list, making it easy to understand related server events and SQL Server events. For more information, see the topic "Log File Viewer" in SQL Server Books Online.

In This Section

Topic Description

Viewing the SQL Server Error Log

Contains information about the SQL Server error log and how to view it.

Viewing the Windows Application Log

Contains information about the Windows application log and how to view it.