Updating Existing Backing Store Schema

If you change the project ontology, that is, if you create, alter or delete a concept or an event, you must update the backing store schema so it matches the updated ontology. In the case of changes in project ontology, you must update the backing store schema before you deploy the updated project.

You may also wish to change which entities are excluded from the backing store using CDD settings (see Excluding Entities from the Backing Store for more information. This change does not require project redeployment. It requires that the updated CDD file is copied to all runtime machines.

Examine the alter script before you run it. The section What the Schema Update Utility Can Handle Automatically provides more information.

To run the Schema Update Utility:

Procedure

  1. Gracefully shut down the deployed application (all agents including cache agents).
  2. Back up your existing database.
  3. Generate the updated EAR file for the modified project.
  4. If you modified aliases when you created the schema, locate the yourname.aliases file you used. It will help you to modify those aliases in the newly generated file, so they match.
  5. Open the be-jdbcdeploy.tra file for editing and set the following properties:
    1. be.jdbc.schemamigration.url=DbURL
    2. be.jdbc.schemamigration.user=username
    3. be.jdbc.schemamigration.pswd=password
  6. Use one of the following:
    1. Database URL that points to the existing backing store. See Adding a JDBC Connection Resource (Now or Later) for example URLs.
    2. Same username and password you used when setting up the backing store. See Run the Initialize Database Script as the DBA or System User

    These properties enable the program to compare the schema of the existing database with the ontology in the project EAR file, and generate the alter script.

  7. Log on as the user name you specified in Run the Initialize Database Script as the DBA or System User.
  8. Run the be-jdbcdeploy utility as explained in Generate the Project-Schema-Specific SQL Scripts (with Wizard), using the updated EAR file.
  9. If any of the new or changed definitions result in entries in the yourname.aliases file, and you want to change the provided aliases, follow instructions in Configuring Aliases File and Project Schema Script. If you modify aliases, remember to generate the scripts again so the modified aliases are used.
    Note: You must use the same aliases that you used before. If any were modified when the schema was created, you must modify them the same way when updating the schema. It can be useful to refer to the original aliases file.
  10. Examine the generated yourname_alter.sql script and modify as needed so you only run statements for changes you want to make. See What the Schema Update Utility Can Handle Automatically for details.
  11. Run the yourname_alter.sql script.

Result

Your database tables are now configured for use.