Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Generating Deployment Scripts for a Store

You can generate store deployment scripts for your projects that use a persistence store. For projects with shared all or store persistence configurations, you can generate migration scripts to migrate an existing database data from a legacy ID format to a new ID format.

For details about the data migration process, see Migrating Projects from TIBCO BusinessEvents Version 5.x to 6.x

To generate project-schema-specific and migration SQL scripts using TIBCO BusinessEvents Studio or the CLI, use one of the following procedures.

Before you begin

(For ActiveSpaces store only) For generating deployment scripts for the ActiveSpaces store, configure the tibco.env.ACTIVESPACES_HOME variable in the `be-storedeploy.tra` file.

Note:

- Ensure that you copied your JDBC drivers file to BE_HOME/lib/ext/tpcl (or other location in your class path).
- Ensure that the database server is started.

## Generating Deployment Scripts Using the TIBCO BusinessEvents Studio

Procedure
1. In the TIBCO BusinessEvents Studio, right-click the project name and select Studio Explorer > Export.
2. In the Export window, select TIBCO BusinessEvents > Backingstore Deployment and click Next.

3. In the Deploy wizard, from the Backingstore Type dropdown, select the required store option and click Next.

   Store Types
   Store Type | Description
   --- | ---
   Relational Database (JDBC) | Select this option if your project has a JDBC backing store setup, such as MySQL, Oracle, SQL Server, and DB2.
   ActiveSpaces | Select this option if your project has ActiveSpaces as a persistence store.
   Apache Cassandra | Select this option if your project has Apache Cassandra as a persistence store.

4. Provide the values for the displayed fields. See Project Schema Specific SQL Script Fields for the list of fields.

5. You can click either of these buttons:

   - Finish - To exit the wizard and generate the project-schema specific SQL scripts.
   - Next - To go to migration scripts generation page (Step 6).

6. On the Generate Migration SQL Scripts page, select the Generate Migration Scripts checkbox to enable the rest of the fields.

   Provide the values for the store connection fields. See Migration SQL Scripts Fields for a list of fields.

   To generate migration scripts for migrating existing data in a project from legacy ID format to new ID format, connect to an existing legacy ID database in the project by using store connection fields.

7. (Optional) Click Test Connection to test if connection to the store is successful.
8. Click Finish to generate the migration SQL scripts.

## Generating Deployment Scripts Using the CLI

You can use the `be-storedeploy` utility (available at `BE_HOME/bin/`) to generate project-schema and migration SQL scripts from the CLI.

Before you beginIf you are using the relational database, then before you runbe-storedeploy, open the file BE_HOME/bin/be-storedeploy.tra for editing. Specify the JDBC database type by using the `java.property.jdbcdeploy.database.type` property:

    java.property.jdbcdeploy.database.type [oracle | db2 | sqlserver | mysql | postgres]

For ActiveSpaces, you can set the rows expiration scan period (`be.as.store.expiration.scan.period`) and default TTL value (`be.as.store.default.ttl`) in `be-storedeploy.tra`. For more details on the expiration scan period and default TTL value in ActiveSpaces, see TIBCO ActiveSpaces documentation.

Note: The expiration scan period value and default TTL values in the `be-storedeploy.tra` file is applicable for the generated schemas only. For an object table, update the value in the `create_tables_as.tibdg`.

Procedure
1. Open the CLI and navigate to the bin folder in BE_HOME.
2. Use the following command to generate backing store deployment scripts for the project:

       be-storedeploy [-p <property file>] [-c <cdd file>] [-o <Schema output file>] [-op <schemagen | migration>] [-s <JDBC | ACTIVESPACES | CASSANDRA>] [-a <true|false>] [-u <PU Name>] [-h] [EAR file path]

   See Store Deployment CLI Utility Options for details on the parameters.

ResultThe scripts are generated in the location that you specified. Information about script generation is also printed to the Console tab. See Generated SQL Scripts for a list of the generated scripts.
Subtopics

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.