jeffluo 发表于 2016-8-30 09:38:19

【SQL Anywhere】 之 Log Parser 支援 SQL 資料庫語法

SQL又讓我想起這幾年來,一個好工具可以讓我解決分析IIS LOG的工作,它就是Log Parser。重點是,連它微軟也支援我們去客製化執行SQL陳述式,就像以下的案例。C:\Program Files (x86)\Log Parser 2.2>LogParser.exe
"SELECT c-ip AS [來源IP], count(c-ip) as [拜訪次數]
FROM C:\SuperSQLServer\IISLOG\u_ex150414.log
GROUP BY c-ip ORDER BY count(c-ip) DESC"來源IP 拜訪次數
-------------- -----
10.1.101.23 22628
165.254.144.21 5144
60.210.22.180 4458
60.210.20.244 4351
23.15.1.59 4080
72.246.191.106 3464
72.246.191.116 3294
72.246.191.10 3208
165.254.144.28 3051
72.246.191.13 2986
Press a key...
Task aborted by user.Statistics:
-----------
Elements processed: 268985
Elements output: 30
Execution time: 4.54 secondsC:\Program Files (x86)\Log Parser 2.2>download URLhttps://www.microsoft.com/en-us/download/details.aspx…

页: [1]
查看完整版本: 【SQL Anywhere】 之 Log Parser 支援 SQL 資料庫語法