Predefined script for automatic event log deletion

Events logged in the SafeGuard Enterprise Database are stored in the EVENT table. For further information on logging, see Reports.

With the Task Scheduler, you can create a periodic task for automatic event log deletion. For this task, you can use the predefined script EventLogDeletion.vbs.

The script deletes events from the EVENT table. If you specify the relevant parameter, it also moves events to the backup log table EVENT_BACKUP leaving a defined number of latest events in the EVENT table.

Before you use the script in a periodic task, you can edit the following parameters:

Parameter Description
maxDuration With this parameter, you specify how long (in days) events should be kept in the EVENT table. The default is 0. If this parameter is set to 0, there is no time limit for events kept in the EVENT table.
maxCount With this parameter, you specify how many events should remain in the EVENT table. The default is 5000. If this parameter is set to 0, there is no limit for the number of events to be kept in the EVENT table.
keepBackup With this parameter, you specify whether deleted events should be backed up in the EVENT_BACKUP table. The default is 0. If this parameter is set to 0, events are not backed up. Set this parameter to 1 to create a backup of deleted events.
Note: If you use the script to move events from the EVENT table to the backup log table, event connection no longer applies. To activate event connection while also using the stored procedure for event cleanup does not make sense. For further information, see Connection of logged events.