WebSphere Enterprise Service Bus for z/OS, Version 6.2.0 Operating Systems: z/OS


Removing 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.

Before you begin

Make sure that you uninstall the application that uses the relationship schema from all servers that access that schema.

About this task

When you 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. This design can present a problem if you attempt to reinstall the application after modifying the relationship or role definitions.
Note: If you use the Unit Test Environment (UTE) test server in WebSphere® Integration Developer, the relationship schema and data are removed from the repository when an application project is removed.

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")

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 to reinstall the application.

To remove the existing relationship schema from the repository, perform the following steps.

Procedure
  1. Locate the database. The database location depends on the database platform.
    Option Description
    Database platform Location
    Derby WASHOME\derby\databases\RepositoryDB
    Other databases The location is configured during installation and profile creation of the server. For example, if you configured the server automatically and selected the default database name, the name of the database is WPRCSDB.

    For DB2® on i5/OS®, the referenced container is a collection instead of a database. It is the collection name rather than the database name that is configured during installation and profile creation; and it is the collection rather than the database that is by default named WPRCSDB.

  2. Delete the database artifacts making up a relationship: Using the tools for your database platform, perform the following steps to delete all database objects for a given relationship.
    1. Before removing any data from the database in the following steps, make a backup of the database.
      Note: For DB2 on i5/OS, make a backup of the collection before removing any data.
    2. Find the relationships tables. The following tables are created at the time the relationships are installed.
      Table Format
      1 table for relationship properties _<relname>_P_uniqueidentifier
      1 table for generating instance IDs for each relationship (on Derby) _<relname>_S_uniqueidentifier
      1 table for role properties for each application-specific role _<relname>_<rolename>_P_uniqueidentifier
      1 table for each application-specific role (for static relationships 1 table for the generic role is also created) _<relname>_<rolename>_RT_uniqueidentifier
      Restriction: Only the first four characters of the relationship name are used. If the database holds tables for multiple relationships, you should distinguish relationship names within the first 4 characters.
    3. Find the stored procedures. Stored procedure objects have the following format:

      _<relname>_RS_uniqueidentifier or _<relname>_<rolename>_RS_uniqueidentifier

    4. Find the sequences. Sequence objects have the following format:

      _<relname>_S_uniqueidentifier

      Restriction: Sequences are not supported under Derby.
    5. Using the tools for your database platform, delete the following:
      1. tables
      2. stored procedures
      3. sequences (except for Derby)

Results

The relationship instance data is removed from the database repository.

What to do next

Now you can reinstall the application.

task Task topic

Terms of use | Feedback


Timestamp icon Last updated: 21 June 2010


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wesb620.zseries.doc/doc/tadm_relmgr_remove_relinstdata.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).