I haven’t found a tool that I love that parses Event Viewer well.
What I do these days I use psloglist from Windows SysInternals to dump the log to a tab delimited file, then I hack on strings in Excel using IFERROR, SEARCH, RIGHT and LEFT to get decently representative strings and then sort and subtotal.
Also today I needed to read a DNN error table while DNN was not behaving well. DNN writes XML to the database; the easiest thing to do is to cast it to XML with
cast(LogProperties as XML)
Plug it into a temp table, then process the XML using Sql Server’s XML query command:
select cast(LogProperties as XML) as props, LogTypeKey, LogGUID, LogCreateDate into #tmptable from EventLog with(nolock)
WHERE LogTypeKey='GENERAL_EXCEPTION'
select count(*) as cnt,a.msg
from
(select cast(props.query('LogProperties/LogProperty/PropertyName[text()="Message"]/../PropertyValue/text()') as nvarchar(MAX)) as msg
from #tmptable) a
group by a.msg
order by COUNT(*) desc
select cast(props.query('LogProperties/LogProperty/PropertyName[text()="Message"]/../PropertyValue/text()') as nvarchar(MAX)) as msg, *
into #tmp2
from #tmptable
select * from #tmp2 where msg like '%[interesting keyword]%' order by LogCreateDate desc
I test out xpath using Xpath Visualizer.