I know this information is spread around the web a bit here and a bit there so I´m just adding already existing content but I need to save this somewhere I can find it again so here it goes.

It´s a pain trying to look through or get statistics from IIS using the standard IISW3C-format. The files often get really big or in the other corner, they´re too many to look through so I´ve found this method works really, really well.

Microsoft has a tool simply called LogParser it can do a whole lot more than what I describe here but this is what I use it for. Just install it, run it, and a command prompt will show up. Place yourself in the IIS-log folder and use the command kinda like this one:

C:\LogDirectory> logparser "SELECT * INTO tablename FROM *.log" -i:IISW3C -o:SQL -server:
"servername" -database:"databasename" -driver:"SQL Server" -createTable:ON

It will now begin the process of parsing the logfiles into the standard columns of the table. It will create everything for you except for the database. Then you can simply use Sql Server Management studio to extract statistics or whatever.

I´ve found this really simple and nice. Enjoy.

Why not join the newsletter?

Why not join the newsletter?

If you're not a fan of facebook or twitter, sign up to the newsletter and I'll send you a quick update every so often with what's going on and new posts coming out.

You have Successfully Subscribed!