13.7. Monitoring Logs

Another aspect of monitoring that is frequently overlooked is monitoring the various log files available. SQL Server writes its own error log, and then there are the Windows Event logs, and you may find events logged in the Application, Security, or System Event logs.

Traditionally, the SQL Server and Windows Event logs have been viewed separately. The SQL Server Management Studio Log File viewer enables you to combine both sets of logs into a combined view.

For SQL Server 2008, the Log File viewer has been revised and now includes a hierarchical view of events where appropriate.

13.7.1. Monitoring the SQL Server Error Log

The SQL Server Error log can contain a lot of very useful information. It is definitely the place to go looking for deadlock information once the relevant deadlock trace flags have been enabled.

Anytime a significant event issue occurs, the first place to search for additional information should be the SQL Server Error Log.

13.7.2. Monitoring the Windows Event Logs

Three Windows event logs may hold entries of relevance to a SQL Server event:

  • Application event log

  • Security event log

  • System event log

These event logs should be another place that you go to look for information about any issues that arise with SQL Server.

Get Professional Microsoft® SQL Server® 2008 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.