(Deprecated) Archiving the Decision Center database
Your Decision Center database can contain multiple versions of your rule artifacts. You can archive versions that you do not use to reduce the database size and improve performance. The archiving tool leaves old data available in the database, whereas the cleanup tool permanently deletes items from the repository.
The archiving tool is deprecated in Decision Center as of
V9.6.0.0. For a list of deprecated features, see Deprecated and removed features.
Active versions are the versions that you currently use and you want to keep (for example, your current version and the more recent versions within the last year).
Inactive versions are the versions that you do not use anymore, and you want to archive (for example, versions that are too old).
To clean up your database, you must copy the active versions to a new schema. You make
this copy by using an SQL script that is generated by the
gen-archive-repository-script Ant task. To run this script, you can use a
dedicated database connection tool or the execute-schema Ant task.
This new schema becomes the one you use in your daily work, and the old schema is archived. This old schema contains all the data (active and inactive versions) until the moment you archive it. You no longer update it, but you can still use it for queries.
You can select all versions to be copied from a certain date, with the archiveDate
parameter. With this parameter, you can also decide to remove the active versions from your old
schema so that they remain only in the new schema (see dropOldData). If the archiveDate parameter is not set,
all the latest versions of elements in your branches, releases, activities, snapshots, and
deployments snapshots are copied into the new schema.
The following diagram shows the state of a project before archiving. There are a main branch, and two sub-branches.

archiveDateThe following diagram shows the elements in green that are copied to the new schema: versions of the rule artifacts that were last updated after the date that you set, and all latest versions of rule artifacts that belong to a branch if this branch is copied.

archiveDateThe following diagram shows the elements in green that are copied to the new schema: the latest versions of the rule artifacts in all types of branches.

gen-archive-repository-role
You use this task to grant required privileges to copy the old database content into the new schema. This task uses the same parameters as the task that builds the role for the migration process (gen-migrationXX-role, see Ant tasks for database migration).gen-archive-repository-script
You specify the following parameters for this task:- username
- The administrator's user name.
- password
- The administrator's password.
- server.url
- The URL to access Decision Center.
- datasourceName
- The new data source name.
- oldDatabaseSchemaName
- The name of the database schema used by the previous data source, which usually matches the user name specified in the data source configuration.
- archiveDate
- (Optional) The date that specifies which versions to copy, with the format
yyyy-mm-dd. All elements created or updated after the date that you set are copied from the old data source to the new one.If you do not specify
archiveDate, only the latest versions of elements visible in your branches, including ungoverned branches, releases, activities, snapshots, and deployment snapshots are copied into the new schema.
- dropOldData
- (Optional) Use this parameter if you want to delete the active versions from the old database
schema, so that you only have inactive versions in the archive.
To do this, the database user for the new data source needs write permission for the old schema. If you remove active versions from the old schema, you can no longer update the old database, but you can access the inactive versions in read-only mode.
Possible values for thedropOldDataparameter aretrueorfalse, and the default value isfalse.Note: You can use thedropOldDatafeature only with thearchiveDateparameter. - outputFile
- (Optional) The name of the file where the SQL script is generated.
Example
You are administrator for the Decision Center database. You want to archive versions of the rule artifacts in this database that are older than December 31, 2028.
ant gen-archive-repository-script -DoldDatabaseSchemaName=<odm> -DarchiveDate=2016-12-31- The Main branch of your project is copied, even though it was created in
2026 and last updated in 2027. This is because the main branch is always copied to your new database
schema, regardless of the
archiveDateparameter. However, this is not the case for sub-branches or snapshots in the project. - Sub-branch 1, which was created in 2026 and last updated in 2026, is not copied.
- Sub-branch 2, which was created in 2027 and last updated in 2029 with a new rule, is copied.
- In Spring Release, the change activity Adjust Scoring, which does not contain any update after October 2028, is not copied. The status of the activity is not considered (whether it is Complete, Cancelled...), only the activity date is taken into account.
- With the archiveDate parameter, versions in a recycle bin that are older
than December 31, 2028 are not copied.Note: If the
archivedateparameter is not set, the recycle bin of a branch in your new schema is empty. - The change activity Adjust Insurance was last updated in 2029, so it is copied. It contains several rule artifacts that were not updated since 2027, but they are also copied. If the parent branch is copied, all the latest versions of elements in this branch are copied as well, even if they are older than the archive date.