Compressing a Database
When an item is deleted from the database, some information about the item is retained. This occupies both disk space and memory. Over time, a large number of items may be deleted, especially when Groups or Templates containing items are deleted. To free up the space used by the deleted items, you can compress the database.
Each item in the database is allocated a unique identifier called an Object ID. The Object ID is used to associate historic data and Event Journal messages with an item in the database.
The Compress Database feature can be used on a live system with no effect on operational availability. The tasks performed by the Compress Database feature are:
- Removes information about the deleted items
- Removes online Event Journal records that are associated with the deleted items (archived Event Journal records are not compressed)
- Removes configuration change records that are associated with the deleted items
- Re-orders online Event Journal files into chronological order (this can significantly improve the speed of Event Journal searches).
ATTENTION: Compressing the database results in Event Journal records being re-ordered. This changes the Record ID, which while having no adverse affect on ClearSCADA, may cause issues with external applications that use the Event Journal and configuration change record IDs.
To compress a database:
- Make a backup of the database (see Back up the Database). You may need to restore the database if there is a problem with the compression process.
- On the main server, right-click on the ClearSCADA icon in the taskbar.
A context sensitive menu is displayed. - Select the Compress Database option.
A log on prompt is displayed. - Log on via a User account that has the System Admin permission for the System (Root Group).
- Choose to proceed with the compression or abort it:
- If the effects of the compression are permissible, select the Yes button to begin the compression process.
- If the effects of the compression are not permissible, select the No button to quit the compression process.
- If the effects of the compression are permissible, select the Yes button to begin the compression process.
- If the effects of the compression are not permissible, select the No button to quit the compression process.
When you have compressed the database, the database file will be at its smallest possible size—the configuration relating to deleted items has been removed. The compression process also releases additional memory, although this is a small amount when compared to the amount of memory used by a running system.