WebSphere brand IBM WebSphere Sensor Events, Version 6.2

Scheduling deletion of tag data

This topic describes how to set up a regular schedule for deleting historical tag data.

About this task

Currently Location Awareness Services for WebSphere® Sensor Events does not automatically archive historical data. Therefore, it is necessary to delete historical data on a regular basis to increase performance. You can schedule tag data to be deleted on a regular basis using the ATLASDB_DEL_TAG_HISTORY_SCHEDULE.bat script. The script schedules a task to delete all historical data entries that are older than eight hours and for which newer data is available. This allows you to consistently delete historical data.

Make sure you plan carefully for the deletion of historical tags and events. For example, if you have a lot of events in the CEI database within a short period of time, this can lead to performance degradation. You should also use the Web service to delete and archive CEI events as the notification program for the automatic clean up of those events, since they do not need to be kept.

To retain historical data for a longer period of time, you must archive and back up your data separately.

Complete the following steps to set up a regular deletion process for historical data:

Procedure
  1. Create a directory named C:\tools\history and copy all files from the LAS_HOMEDB2\Tools\History to the new directory. To create the directory in a different location, edit ATLASDB_DEL_TAG_HISTORY_SCHEDULE.bat with the new location.
  2. Edit ATLASDB_DEL_TAG_HISTORY.bat to specify your DB2® installation directory.
  3. Edit ATLASDB_DEL_TAG_HISTORY_SCHEDULE.bat to enter your DB2 Workgroup Server Edition user ID and password.
  4. (Optional) This script deletes all historical data entries that are older than eight hours and for which newer data is available. If you want to change the schedule, for example to delete data every six hours, edit the 8 hour entry in the insert and the delete statements.
  5. Run ATLASDB_DEL_TAG_HISTORY_SCHEDULE.bat to schedule the deletion task.
    Note: After running this script, you must either manually edit each task to change the schedule or you must delete the scheduled tasks and then rerun this script after editing it.

    Each time the deletion task runs, it will log results into the C:\tools\history\ATLASDB_DEL_TAG_HISTORY_DATA.txt file.


Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2009. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.