I'm using IIS 8.5 Advanced Logging and also logging some custom HTTP headers. How can I import the raw logs into SQL on a regular basis (i.e. every minute)? I want to avoid the overhead of ODBC logging, which Microsoft also recommends against. Is there a command line utility that I can script via Powershell, for example? Perhaps bcp
? Something else?
Sql-server – Import IIS Advanced Logs into SQL
iisloggingpowershellsql server
Best Answer
You can use Microsoft's log parser utility.
It has the capability of dumping into a SQL database as well as having the ability to create a checkpoint file so that it only imports records it hasn't processed. It can be used either as a stand alone executable or programmatically invoked via an ActiveX control