We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • Re: New GUI tool for MS Log Parser, Log Parser Lizard

    Jan 08, 2008 11:14 AM|veritas|LINK

    Yes, it works for SQL Server errorlogs, set the input format to TEXTLINE and away you go. This gets around how slow Enterprise Manager is at opening the errorlogs and gives filtering and the ability to save the queries. A sample query is as follows:

    select top 500 substr(text,0,22) as Date, substr(text,23,9) as Source, substr(text,32) as Message from '\\server\C$\instance\log\ERRORLOG.*' where Message not like '%Log backed up%' and Message not like '%DBCC TRACEON%'
    and Message not like '%Login failed%' and Message not like '%Database backed up%'  and Message not like '%Database log truncated%'
    and Message not like '%DBCC CHECKDB%'

    Just what I need. The ability to use variables for server and instance above so I can point at any of my production servers would be good. I've also got the above select to work natively as TSV input:

    logparser.exe. "select top 500 STRCAT(STRCAT(DATE,' '), TIME) as Date, Source, Message from '\\server\C$\instance\log\ERRORLOG.*' where Message not like '%Log backed up%' and Message not like '%DBCC TRACEON%'
    and Message not like '%Login failed%' and Message not like '%Database backed up%'  and Message not like '%Database log truncated%'
    and Message not like '%DBCC CHECKDB%' " -i:TSV -iseparator::spaces -iHeaderFile:c:\formatfile.txt -nskiplines:9

    but when I open Queries.. and click on Properties... I get Exception has been thrown by the target of an invocation and then the values I enter don't get saved.