Sometimes you need to query (using a SQL style language) your IIS logs to understand what is going on. In short, We mean that i tis not practical to import, say, 4GB of data into your database just to run queries. This is where Log Parse comes in handy. Here is an example: run > cmd Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\>cd\program files (x86)\log parser 2.2 C:\Program Files (x86)\Log Parser 2.2> C:\Program Files (x86)\Log Parser 2.2>LogParser.exe -i:W3C "SELECT TOP 25 EXTRACT_EXTENSION(cs-uri-stem) As Extension, COUNT(*) As Hits FROM c:\inetpub\logs\Log Files\W3SVC1\* GROUP BY Extension ORDER BY Hits DESC" -o:CSV Extension,Hits ,6 ico,3 png,1 Statistics: ----------- Elements processed: 10 Elements output: 3 Execution time: 0.01 seconds C:\Program Files (x86)\Log Parser 2.2>cls LogParser.exe -i:W3C "select * into C:\Storage\travellogs\Logs\OUTPUT_09.CSV FROM C:\Storage\travellogs\Logs\ex120619.log where time > '21:00:00' and time <'22:00:00'" -o:CSV Statistics: ----------- Elements processed: 1908736 Elements output: 131252 Execution time: 17.74 seconds C:\Program Files (x86)\Log Parser 2.2> LogParser.exe -i:W3C "select * into C:\Storage\travellogs\Logs\OUTPUT_09.CSV FROM C:\Storage\travellogs\Logs\ex120619.log where time > '09:00:00' and time <'10:00:00'" -o:CSV C:\Program Files (x86)\Log Parser 2.2>LogParser.exe -i:W3C "select * into C:\Storage\travellogs\Logs\OUTPUT_09.CSV FROM C:\Storage\travellogs\Logs\ex120619.log where time > '09:00:00' and time <'10:00:00'" -o:CSV Statistics: ----------- Elements processed: 1908736 Elements output: 83747 Execution time: 25.82 seconds C:\Program Files (x86)\Log Parser 2.2>
















