IBM BPM, V8.0.1, All platforms > Administer applications and processes in the runtime environment > Manage relationships

Remove relationship instance data from the repository

An application that uses relationships has associated relationship schema and data in a repository. The repository is the database configured to hold the relationship instance data. When you uninstall such an application from a production server, the server does not remove the relationship schema and data from the repository. To do so, you need to remove the existing relationship schema manually.

When install an application containing relationships, the server creates the corresponding database schema objects including tables, indexes, sequences, and stored procedures. At run time, the tables are populated with the relationship instance data. If you uninstall the application that contains relationships, the tables and instance data are not removed from the database. The next time the application is installed, any new static relationship data in the application is not populated, and if the relationship definition is changed, the relationship table is not recreated. This can result in errors.

If you reinstall the application with the same relationship, the old schema is reused. However, if the relationship or role definition is modified in such a way that makes it incompatible with the existing schema, the relationship service throws an exception and terminates the installation of the relationship. The logs show the following exception and message:

RelationshipServiceException("table <tablename> already exists, but the table schema is different from current role definition")

If you use the Unit Test Environment (UTE) test server in IBM Integration Designer, the relationship schema and data are removed from the repository when an application project is removed.

The solution for this problem is to remove the existing relationship schema artifacts manually (using the tools supplied by the database platform of your repository), and then to reinstall the application.

To force the relationship database artifacts to be removed, use the RelationshipDatabaseSchemaDrop script or the dropRelationshipDatabaseSchema API before you uninstall the application.

Neither of these interfaces will detect when a relationship is shared by other applications. You can also use database tools to remove the existing relationship schema from the repository.

Manage relationships