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.
Procedure
-
Gracefully shut down the deployed application (all agents including cache agents).
-
Back up your existing database.
-
Generate the updated EAR file for the modified project.
-
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.
-
Open the
be-jdbcdeploy.tra file for editing and set the following properties:
-
be.jdbc.schemamigration.url=DbURL
-
be.jdbc.schemamigration.user=username
-
be.jdbc.schemamigration.pswd=password
-
Use one of the following:
-
Database URL that points to the existing backing store. See
Adding a JDBC Connection Resource (Now or Later) for example URLs.
-
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.
-
Log on as the user name you specified in
Run the Initialize Database Script as the DBA or System User.
-
Run the
be-jdbcdeploy utility as explained in
Generate the Project-Schema-Specific SQL Scripts (with Wizard), using the
updated EAR file.
-
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.
-
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.
-
Run the
yourname_alter.sql
script.
Result
Your database tables are now configured for use.
Copyright © TIBCO Software Inc. All Rights Reserved.