09-10-04 10:53 PM
On Thu, 09 Sep 2004 04:32:47 -0700, Rekkie
<my_unique_anti@spam.email.com> wrote:
>I am trying to import some logfiles to SQL Server Table(WebTraffic)
>using the Logparser COM in a C# environment. However I have encountered
>a bit of a problem in that the results are not consistent. If try import
>the log file, every new importation results in a different number of
>rows and consequently the total webtraffic that I am interested in. I am
>using the following query:
>
>SELECT LogFilename, date, s-ip as sip, c-ip as cip, SUM(sc-bytes) as
>scBytes, SUM(cs-bytes) as csBytes
>FROM ex040801.log
>TO WebTraffic
>WHERE s-ip = 'xxx.xxx.xxx.xxx'
>GROUP BY LogFilename, c-ip, s-ip, date
>
>(I am grouping by client ip to reduce the number of lines inserted into
>the SQL table)and execute it using
>
>MSUtil.COMSQLOutputContextClass outputContext = new
>MSUtil.COMSQLOutputContextClassClass();
>
>MSUtil.COMIISW3CInputContextClass inputContext =new
>MSUtil.COMIISW3CInputContextClassClass();
>
>logQuery.ExecuteBatch(query, inputContext,outputContext);
>
>Does anyone have any idea where I am going wrong or can give me some
>clue of what is going on???
>
>Any Help will be much appreciated.....
Might try posting in the forum on LogParser.com. The programmer who
wrote LogParser monitors them and answers questions fairly quickly.
Plus, there's obvious issue if this is the active log file that the
log is growing and you should expect changes.
Jeff
[ Post a follow-up to this message ]
|