Parse IIS Logs with Log Parser.

Requirement: Need some statistical data from IIS logs

Log parser: This is from Lizard Labs and it’s not free tool. This is very powerful tool with amazing GUI. Log Parser From Lizard Labs

Log Parser(Command Line): This is from Microsoft and it’s free. Download

I have used this command line interface to process the log files into database. I can run multiple reports once the data is in database.

Steps:

  1. Copy all the logs into separate directory.
  2. Open command prompt and go to “C:\Program Files (x86)\Log Parser 2.2”.
  3. Run the this statement to process logs and insert data into Sql Server.

LogParser "SELECT * INTO tablename FROM D:\Logs\*" -i:W3C -o:SQL -server:servername -database:databasename -driver:"SQL Server" -username:sa -password:**** -createTable:ON

Hint: you can find examples by running this command “logparser -h examples”.

Thank You

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s