homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: DixonJones & mademetop

Website Analytics - Tracking and Logging Forum

IIS Logs and SQL
How can I import logs into SQL Server and analyze them.

10+ Year Member

Msg#: 136 posted 10:33 pm on May 29, 2001 (gmt 0)

I am looking to import my IIS logs into SQL 2000 and then run my log analyzer against SQL, not a text file or proprietary database. My logs are getting huge and I want to write custom queries against my logs as well as use a tool like Webtrends.

I need a tool to import form IIS text logs into SQL and a tool to analyze logs which are stored in SQL not some proprietary database created by the tool.

I know that Site Server can and some very high end Webtrends tools do this, but I would prefer not to spend $3000+!

Any ideas?



10+ Year Member

Msg#: 136 posted 12:36 pm on May 30, 2001 (gmt 0)

I suppose depending on the LOG format, you may be able to use the Data Transformation Services (DTS) to import that data. I'm not sure if you'll have to create the table first or not...

...as for analyzers, I don't know of any that access SQL directly. But it really sounds like a good multi-dimensional data cube might fit the bill!~


10+ Year Member

Msg#: 136 posted 4:20 pm on May 30, 2001 (gmt 0)


Great idea, but we have tried DTS, unfortunately, the IIS log file is space delimited, which means any space in the field values wrecks the import. Furthermore, anytime you restart IIS, it inserts a status report into the log. Thus, using DTS is a real pain.

PS: Thanks for your great discussion on cloaking. We implemented it here and it works great.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 136 posted 7:20 pm on Jun 3, 2001 (gmt 0)

Welcome to WebmasterWorld.

There is a configuration in IIS that will store the logs in SQL Server. In the IIS configuration dialogs, under Web Site, where you enable logging, it allows you to specify the save format. One of the choices is to ODBC, which you can configure to use SQL Server.

For your existing log files, a VB or VBScript programmer can import those into SQL Server for you in no time at all. Examine the Split function to divide up the lines into their components, then use some ADO code to add it to SQL Server.

I just tried it, storing to an Access database. Works like a charm. You have to create a table with the correct fields. They give you a .sql script for SQL Server, but you have to do it by hand for Access. Was able to get it working in under 10 minutes. This feature only works in IIS Server on Win2000, which comes with Win2000 server. You will have to export the data back to a text file to use it with most analysis tools, though.


10+ Year Member

Msg#: 136 posted 5:49 pm on Jun 14, 2001 (gmt 0)


I have not checked this thread in a bit. Sorry. Thanks for your thoughts. Tell me what you think of this.

Our problem with using split is that IIS makes the text file space delimited. However, many of the field values have spaces in them. Therefore we can't just do a simple split of the data since we can't reliably use it as a delimiter. We collect a lot of data and some of it is irregular.

As for using ODBC, we thought of that, but some say it is a resource hog. We were hoping to do the import off line on a non-production server.

With some work, we can work through these issues. The real issue for us is finding an interpretation tool like webtrends that works with SQL. We want to write custom queries, but we don't want to write every query.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 136 posted 4:09 am on Jun 20, 2001 (gmt 0)

IIS doesn't put spaces into the actual fields. Instead it puts + signs where a space would appear. So split should work. However, last weekend while searching for something else, I found that IIS has a library that deals with log files called the MSWC IIS Log Object Library. It will split the file for you.

Send me stickymail for another alternative for loading the database.


10+ Year Member

Msg#: 136 posted 1:55 am on Jun 28, 2001 (gmt 0)

Have any of you seen a problme using IIS compared to Apache as far as rankings are concerned? We host a lot of pages and get great rankings with Apache yet when we set a server up with IIS we seem to get less rankings. Does the spider have any more difficulty with IIS than Apache?

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved