Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 IIS logs on SQL2000/MSDE(?)

Author  Topic 

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2004-03-17 : 18:49:55
I'm wondering if anyone has tried logging IIS-data (website logfiles) to a database instead of to files which is the default? It would be quite handy to be able to run various selects in realtime but I'm worried of the performance of the server and if this type of logging creates a great deal of overhead or not.

I have two NLB'd webservers and one database-server and the possible options would be to install an MSDE on both the webservers or just use the sql-server for it all. Does anybody know anything about this?

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2004-03-17 : 18:58:05
I remember wanting to do this once, and had a discussion with someone who had tried it. I can't remember the reasons now, but there is a big gotcha in there. It's either performance, or that it just doesn't work on some platforms. Basically the end verdict was that it is more hassle than it's worth.

What you are better off doing, is using the log parsing tool that MS put out [1]. It will let you import logs into a database, or even query them directly with an SQL syntax.

[1] http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=8cde4028-e247-45be-bab9-ac851fc166a4



Damian
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2004-03-17 : 19:06:50
I did try to run the logs of my local test-site into an access-database and it seemed to work fine but then again I'm the only one using the testserver I belive I could make it work with the platform-setup I have which is pretty basic, but it's really the performance I'm worried about. I'm downloading the log-pareser as we speak, hopefully I can make use of it...
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2004-03-17 : 19:10:33
I've got IIS-->SQL Database running on my production system. I've not really run into any gotcha's, but I can tell you that you need a pretty fast SQL Server (Disk, RAM, CPU) to do this. It's takes up MUCH space for us!

I think the only gotcha is that you get more info when logging to file than when going direct into SQL server. The gotcha with the files is you don't have up-to-the-second logs in SQL server to query. You have to import those files when you are trying to mine that data.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2004-03-17 : 19:19:10
Wow, excellent feedback Michael! The website generates about 50MB (25MB on each server) of logfiles per day and allthough it's not all that much it will add up after a while. If I go through with this I'll probably do a cleanup once a month or something.

What would you recomend: MSDE on each of my P4 2.4Ghz 512MB RAM single IDE-disks or log it all to my SQL-server database which is DUAL AMD 2.4Ghz 1GB RAM RAID1 with SCSI? The logging to the sql-server will offcourse add a little bit of traffic to the network aswell...
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2004-03-17 : 19:53:18
Separate Logs don't tell you much. I'd put them into the central database server. Let your webservers to webserver stuff and your database server do database stuff.

That database server might be a bit on the weak side for doing this on top of whatever database stuff it's currently doing. I suspect that this is going to put addtional load on your RAID 1 array.
If you can afford it, try to separate out your Transaction Logs and Data into two separate RAID arrays on two separate SCSI channels.

Do some performance monitoring on your SQL server BEFORE you turn this on, and then again after you turn this on. If it puts too much strain on your SQL server, go with the Text file solution.

Michael



<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page
   

- Advertisement -