Purging old data from a Rational Synergy database
What is the best way to purge all but the most recent releases of my software from an old Rational Synergy database?
The size of a Rational Synergy database can continue to grow larger, even when regular maintenance activities are used to remove unneeded data. As a result, performance can degrade over time because if the growing amount of data in the database.
There is benefit in maintaining development history. However, maintaining this history can degrade performance.
The traditional method for reducing the size of a database is to use the Save Offline and Delete (SOAD) function. The database must be DCM-enabled, and you must have a license for Rational Synergy Distributed. If you are using Rational Change, you must have a license for this software, too.
The SOAD functionality can be used to identify groups of objects by scope, deleting them and optionally saving them in a DCM package format that can be reimported into the database if needed. SOAD always leaves one version of every object instance in the database to facilitate the reimporting of the history.
Otherwise, reducing database size requires that you run the ccm collapse and ccm delete commands and use queries to identify specific objects or groups of object to remove. This process requires care, as objects can be used in multiple contexts in a Rational Synergy database.
NOTE: The Rational Synergy CLI introduced in Rational Synergy 7.0 does not include the ccm collapse command. As of release 7.2, the Classic CLI is no longer available. Therefore, use the SOAD solution for release Rational Synergy 7.2.
You can start by identifying versions of projects that you want to removed. Remove higher level projects first, and then remove subprojects. The delete command fails for any object that is in use by another project. By deleting or collapsing specific project versions first, you leave many unused source objects that can be identified and removed.
Important query functions:
has_attr('source') - including this string prevents inclusion of tasks, problems, project groupings, or other important database objects. Results are projects, dirs, and source files.
is_bound() - use this string to return objects that are bound to (used in) a project. Use the "not is_bound()" string to find objects not in use.
1. Identify top-level projects you want to delete:
ccm query -t project "release=ico/1.2"
1) ico-int prep jdoe project ico H#1 H#6
2) ico-int_20120104 integrate jdoe project ico H#1 H#6,H#44
3) ico-int_20120104_2 integrate jdoe project ico H#1 H#6,H#49
ccm set role ccm_admin
ccm delete -p @2 ( or use ccm collapse @2 if the project has a successor)
2. Identify and delete unused objects from the release:
ccm query "release='ico/1.2' and has_attr('source') and not is_bound() and not cvtype='project'"
*Review the output to make sure that all objects are source objects.*
ccm collapse @
The "and not cvtype='project'" is included to suppress top-level projects that you may not want to remove.
Also, the documentation (Admin Guide) points out how you can remove obsolete products:
ccm query "is_product=TRUE and not is_bound()"
ccm collapse @
These steps are merely suggestions. When you complete this procedure, you might have project groupings, tasks, and release definitions that are no longer needed. You can remove these objects at your discretion.
CAUTION: Ensure that you keep a backup of the database before you delete any data from it. Also, make a copy of the database and trim the new copy. Any excess trimming can then be undone by exporting from the original and importing into the copy.
More support for:
Software version: 6.4, 6.5a, 6.5, 6.6a, 7.0, 7.1a, 7.1, 220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52, 7.2, 184.108.40.206, 220.127.116.11
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1579344
Modified date: 26 November 2012