Systems Engineering and RDBMS

Log File Viewer in SQL Server 2005

Posted by decipherinfosys on April 2, 2008

SSMS (SQL Server Management Studio) ships with a Log File Viewer which can be used to look into the SQL Server logs as well as the Windows Event Logs (Application, Security and System) all in one single interface.  You can search for items based on filters or free text and you can also export the data as needed and save it with a *.log, *.txt and *.csv file extensions.  Here is how you can go about launching it:

From SSMS, navigate to the Management folder in Object Explorer.  Once you do that, open up SQL Server logs and double click on any of the logs.  It should open up the Log File Viewer interface which will look like the image shown below:

lf_1.jpg

As you can see from above, there are four choices for the logs:

  1. Database Mail Logs
  2. SQL Agent Logs
  3. SQL Server Logs, and
  4. Windows NT logs

You can then click on the Filter and put in your filter conditions:

lf_2.jpg

As you can see from above, the text is case insensitive.  You can also click  on the Search tab and search for text in the message.

One can click on Export and save the log or a sub-set of the log (based on filters and searches) as files with the extensions that were mentioned above.  One can then  also load them up on a separate machine by using the “Load Log” tab.  This gives one flexibility of analyzing the production logs in a development environment and this process could be very useful in troubleshooting issues.  An analysis of the combination of SQL Server and Windows logs are typically required to get the overall picture of the events.

2 Responses to “Log File Viewer in SQL Server 2005”

  1. […] We can then read the logged data using either event viewer (start/run/eventvwr) or using the Log File Viewer or a new function: […]

  2. […] and you can view all the log events using the log file viewer. You get all the advantages of the log file viewer as we had discussed before in one of the posts i.e. searching, filtering etc. If using T-SQL, you […]

Sorry, the comment form is closed at this time.

 
%d bloggers like this: