Saturday

LogParser

- Create a database w3svc
- Run the folowing SQL Script
USE [W3Svc]GO/****** Object: Table [dbo].[IISLogs] Script Date: 02/18/2006 22:41:50 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[IISLogs]( [date] [datetime] NOT NULL, [Time] [datetime] NULL, [c-ip] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [cs-username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [s-sitename] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [s-computername] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [s-ip] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [cs-method] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [cs-uri-stem] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [sc-status] [int] NULL, [sc-bytes] [bigint] NULL, [cs-bytes] [bigint] NULL, [time-taken] [bigint] NULL, [cs-host] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [sc-substatus] [int] NULL) ON [PRIMARY]
GOSET ANSI_PADDING OFF

----------------------------------



Go to logparser cmd directory and execute the following command..... Change the logfile path....

logparser "SELECT date,time,c-ip,cs-username,s-sitename,s-computername,s-ip,cs-method,cs-uri-stem,sc-status,sc-bytes,cs-bytes,time-taken,cs-host,sc-substatus INTO IISLogs FROM "C:\WIN2003\system32\LogFiles\W3SVC1\ex*.log" " –i:IISW3C –o:SQL –database:w3svc –iCheckpoint:MyCheckpoint.lpc

Followers