Friday, June 18, 2010

Microsoft LogParser

Today I was frustrated with the built in error log in SQL SERVER 2005 and did some research and found the following link to Microsoft LogParser that can be used to search the error logs.

http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en



Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory®. The results of your query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart.

I have found this very useful

A sample query to search in the error logs is as follows:

Logparser.exe "select top 100 substr(text,23,9) as ESource, substr(text,0,22) as EDate, substr(text,32) asEMessage from \\d:\databases\MSSQLTEST\LOG\ERRORLOG.* where EMessage like '%database \'master\'.%'" -i:textline

No comments:

Databases and Data Visualisations Course for kids Week 1

As mentioned last week, I have started the Databases and Data Visualisations course for kids aged between 11 to 15 years yesterday. It was...