Can I cintrol the size of the Jet dB file?

Support, Questions and Discussions on WinSyslog

Moderator: alorbach

Google Ads


Can I cintrol the size of the Jet dB file?

Postby Yves » Mon Jul 19, 2004 8:59 am

Hi,

I would like to avoid that the JET DB file used for logging would become too large. Is there any way to archive or empty this file after a while?
Yves
 

Postby mmeckelein » Wed Jul 21, 2004 9:29 am

Hi Yves,

we have a windows tool that can delete all entries older than n days in the Winsyslog database. The tool is freeware and is called Log deleter. You can download it at
http://www.adiscon.org/download/logdeleter.zip

Hope this is helpful for you.

Best regards,
Michael Meckelein
Adiscon
mmeckelein
Adiscon Support
 
Posts: 176
Joined: Wed Mar 12, 2003 12:07 pm

Postby Guest » Fri Jul 30, 2004 7:04 am

It works fine. Thanks
Guest
 

Re: Can I cintrol the size of the Jet dB file?

Postby ptaylor » Tue Sep 08, 2009 6:16 pm

In my case, I'm using a MySQL database. The SystemEvents table had grown to almost 27 million records and the SystemEventsProperties table was over 80 million. Using this tool did clean up the SystemEvents table, but left the SystemEventsProperties table as is.

What do I do to get the corresponding entries in the SystemEventsProperties table deleted?

Thanks,
Paul
ptaylor
New
 
Posts: 6
Joined: Tue Dec 09, 2008 5:36 pm

Re: Can I cintrol the size of the Jet dB file?

Postby ptaylor » Thu Sep 10, 2009 5:14 pm

Anyone?

It looks like during the last few months I'm generating about 3.5 - 4 million records a month in the SystemEvents table, and about 3 times that in the SystemEventsProperties table. What can be done to clean this table up in an automated fashion? I want this to be a relatively maintenance-free installation, if possible.

I could possibly write a program that pulls each record where SystemEventsProperties.SystemEventID is unique, then try to pull back an event for each and every one of those out of the SystemEvents table, and if there is no event that matches, then delete all records in the SystemEventsProperties file with that SystemEventID. I imagine there is an easier way, but I'm no SQL guru.

Thanks,
Paul
ptaylor
New
 
Posts: 6
Joined: Tue Dec 09, 2008 5:36 pm

Re: Can I cintrol the size of the Jet dB file?

Postby ptaylor » Thu Sep 10, 2009 5:58 pm

I think this SQL statement might do the trick, but when I run it, it takes an exceptionally long amount of time to complete. (In fact, my first run of it against my monster database is still going, probably about 15-20 minutes after it started).

Code: Select all
DELETE FROM SystemEventsProperties
WHERE NOT EXISTS (SELECT *
        FROM SystemEvents
        WHERE SystemEvents.ID = SystemEventsProperties.SystemEventID);


I'm afraid that it might not be logging all the events that are happening right now. Is there something I can do to make the SQL not block my inserts? I think I'm using MyISAM tables and that INNODB tables are slower to write data to, but lock at the row level, not at the table level like the MyISAM tables do.
ptaylor
New
 
Posts: 6
Joined: Tue Dec 09, 2008 5:36 pm

Re: Can I cintrol the size of the Jet dB file?

Postby ptaylor » Thu Sep 10, 2009 6:42 pm

Ok - It took probably 30+ minutes, but it worked. I now have a little over 11 million records in the SystemEventsProperties table. This freed up 4.8 GB of space, which was reclaimed when I performed an Optimize on that database table.

So, any way to do this in smaller bursts (like how the LogDeleter only deletes X number of entries at a time) so we won't be blocking database writes?

Thanks,
Paul
ptaylor
New
 
Posts: 6
Joined: Tue Dec 09, 2008 5:36 pm

Google Ads



Return to WinSyslog

Who is online

Users browsing this forum: No registered users and 0 guests

cron