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
- 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-storedeploy.tra
file for editing and set the following properties:Relational database (JDBC)be.jdbc.schemamigration.url DbURL
be.jdbc.schemamigration.user username
be.jdbc.schemamigration.pswd password
TIBCO ActiveSpaces#be.jdbc.schemamigration.url jdbc:tibco:tibdg:_default;realmurl=http://localhost:8080
#be.jdbc.schemamigration.url jdbc:tibco:tibdg:_default;realmurl=https://localhost:8080;username=<user-name>;userpassword=<password>
#be.jdbc.schemamigration.trustfile /home/user/activespacesdata/realm_data/ftl-trust.pem
Cassandrabe.cas.schemamigration.url hostname
be.cas.schemamigration.port port_number
be.cas.schemamigration.user username
be.cas.schemamigration.pswd BE_USER
be.cas.schemamigration.useSsl true_or_false
be.cas.schemamigration.keyspace keyspace_name
- Use one of the following:
- Database URL that points to the existing peristence store. For details on adding a JDBC or ActiveSpaces Connection resource, see Adding a Shared Resource.
- Same username and password you used when setting up the persistence store. See Initializing the Database and Generate Non-Project Tables
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 Initializing the Database and Generate Non-Project Tables.
- Run the
be-storedeploy
utility as explained in Generating Deployment Scripts for a Store . - 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.
Your database tables are now configured for use.