Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 30 JDBC Backing Store Setup : Generate the Project-Schema-Specific SQL Scripts

Generate the Project-Schema-Specific SQL Scripts
You can do this task using a TIBCO BusinessEvents Studio wizard, or you can do it manually.
Generating Scripts Using the JDBC Deployment Wizard
You can generate the project-schema-specific SQL scripts using the JDBC Deployment wizard in TIBCO BusinessEvents Studio.
Task H Generate the Project-Schema-Specific SQL Scripts (with Wizard)
1.
Table Creation Scripts
2.
You see the Generate JDBC deployment scripts wizard. Complete the values as follows.
Browse to and select a directory where the scripts are to be generated, for example, BE_HOME/bin (This directory is used if you generate files manually.)
Enter a prefix for the output script filenames. For example, if you enter acme, the following scripts are generated: acme.sql, acme.aliases, acme_alter.sql, acme_cleanup.sql, acme_delete, and acme_remove.sql.
3.
If you are creating a new JDBC backing store, click Finish. The scripts are generated in the location you specified. Information about script generation is also printed to the Console tab.
If you are migrating an existing JDBC backing store, click Next. You see the Generate Migration SQL Scripts page. See step 4 for details.
Migration Scripts
4.
Generating Scripts Manually
This section explains how to generate scripts using a manual procedure, instead of using the TIBCO BusinessEvents Studio wizard.
If you are using SQL Server: Before you execute be-jdbcdeploy, open the BE_HOME/bin/be-jdbcdeploy.tra file for editing. Specify sqlserver. in the last line:
This step requires the EAR file for the project. The database utility uses the project ontology information from the EAR file.
1.
2.
Run be-jdbcdeploy.exe using a command with the following format:
be-jdbcdeploy [-h] [-p property file] [-o schema output file] [-c CDDpath] EAR Path
For example:
be-jdbcdeploy -o acme -c D:/myproj/acme.cdd D:/ears/acme.ear
The generated scripts appear in the directory where you run the executable. For example, if you provide the schema output filename acme, you would see files called acme.sql, acme.aliases, acme_alter.sql, acme_cleanup.sql, acme_delete, and acme_remove.sql.
The user-defined part of the database schema is in the schema output file (yourname.sql) as schema definition commands. In Task J you run this script (together with provided scripts) to build the schema in the database.
The options are explained in the following table:
-p, /p, -property, or /property
Tip  If you specify a directory path, the backing store scripts are generated in the specified directory and the last element of the path is taken as the schema output filename.
-h, /h, or /help

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved