Scheduled event cleanup by script

Note: The SafeGuard Management Center offers the Task Scheduler to create and schedule periodic tasks based on scripts. The tasks are automatically run by a service on the SafeGuard Enterprise Server to execute the scripts specified.

For automatic and efficient cleanup of the EVENT table, four SQL scripts are available in the \tools directory of your SafeGuard Enterprise software delivery:

The two scripts spShrinkEventTable_install.sql and ScheduledShrinkEventTable_install.sql install a stored procedure and a scheduled job at the database server. The scheduled job runs the stored procedure at defined regular intervals. The stored procedure moves events from the EVENT table to the backup log table EVENT_BACKUP leaving a defined number of latest events in the EVENT table.

The two scripts spShrinkEventTable_uninstall.sql and ScheduledShrinkEventTable_uninstall.sql uninstall the stored procedure and the scheduled job. These two scripts also delete the EVENT_BACKUP table.

Note: If you use the stored procedure to move events from the EVENT table to the backup log table, event connection no longer applies. To activate connection while also using the stored procedure for event cleanup does not make sense. For further information, see Connection of logged events.