1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Log Parser で解析できる各種形式のSQLテンプレート

Posted at

Microsoft の Log Parser で 解析できる形式の内、Webのアクセスログをよく使用するので、その SQL をメモ。

IIS形式テンプレ.sql
SELECT
     UserIP
    ,Date
    ,Time
    ,TimeTaken
    ,BytesSent
    ,BytesReceived
    ,StatusCode
    ,RequestType
    ,Target
    ,Parameters
FROM
    c:\xxxxx.log
NCSA形式テンプレ.sql
SELECT
     LogFilename
    ,LogRow
    ,RemoteHostName
    ,RemoteLogName
    ,UserName
    ,DateTime
    ,Request
    ,StatusCode
    ,BytesSent
    ,Referer
    ,User-Agent
    ,Cookie
FROM
    c:\xxxxx.log
W3C形式テンプレ.sql
SELECT
     date
    ,time
    ,c-ip
    ,cs-uri-stem
    ,cs-uri-query
    ,sc-status
    ,cs(User-Agent)
    ,cs(Referer)
FROM
    c:\xxxxx.log

参考

サイトの利用状況のログ収集について
https://msdn.microsoft.com/ja-jp/library/cc338018.aspx

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?