首页 > IIS > 导入IIS log入SQLSERVER
2014十一月27

导入IIS log入SQLSERVER

enjoyasp.net IIS 评论关闭

1. Download the Log Parser tool from Microsoft here. I know, it’s old but works great.

2. Dump your IIS log files somewhere (ie: c:\temp\logs).

3. Run this in cmd:

C:\Program Files (x86)\Log Parser 2.2>logparser “SELECT * INTO iisLogs FROM c:\temp\logs\*.log ” -i:iisw3c -o:SQL -server:localhost -database:webLogs -username:sa -password:yourpass -createTable: ON
if you’re on 32bit, run Log Parser will be in this folder:

C:\Program Files\Log Parser 2.2>logparser “SELECT * INTO iisLogs FROM c:\temp\logs\*.log ” -i:iisw3c -o:SQL -server:localhost -database:webLogs -username:sa -password:yourpass -createTable: ON

来自:

http://chrisbitting.com/2012/04/12/importing-iis-logs-into-a-sql-database-table/

下载:log parser:http://www.microsoft.com/en-us/download/confirmation.aspx?id=24659

本文地址:http://enjoyasp.net/?p=3075 , 转载请保留.

本文的评论功能被关闭了.