Checking and deleting old object versions with scripts

You can get size estimates or delete old object versions and collaboration area history in the various tables of IBM® Product Master using shell scripts.

Before you begin

Before you delete old object versions and collaboration area history, you must back up the database.

About this task

Old versions are created for objects like catalogs, items, and categories whenever the objects are exported, imported, or modified. You can use delete_old_versions.sh shell script to delete old versions of objects that are no longer needed. Deleting old object versions restores the database storage space and therefore improves database performance.

You can use the estimate_old_versions.sh shell script to get a size estimate for the number of old object versions in various Product Master database tables.

When the execution of the delete_old_versions.sh script completes, you are prompted if you want to remove Collaboration Area History. The delete_collab_history.sh script is merged with the delete_old_versions.sh script. The collaboration history records are created for objects like items and categories whenever the objects go through a workflow. You can delete collaboration history records that are no longer needed with the delete_old_versions.sh script. Deleting collaboration history records restores the database storage space and thus improves database performance.

These scripts are run when Product Master is running. To avoid any potential impact on performance, you should run these scripts when the Product Master application is lightly used, for example during night time or weekends.

Procedure

Run the estimate_old_versions.sh shell script or the delete_old_versions.sh shell script that are in the $TOP/src/maintenance/old_versions directory.
Collaboration area history takes the code and end_date parameters from the delete_old_version.sh. For more information on the parameters and usage, see delete_old_versions script and estimate_old_version script file.