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:

Navigating the Data Science Seas: A Journey with Microsoft Fabric

Data science is a vast and exciting field, brimming with the potential to unlock valuable insights. But like any seafaring voyage, navigatin...