Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Initializing the Database and Generate Non-Project Tables

Ensure that you have done all earlier tasks that may pertain to your case. See Cases That Need Additional Setup.

## Run the Initialize Database Script as the DBA or System User

This script creates the TIBCO BusinessEvents user and initializes the database.

Warning: Running the script `initialize_database_YourDBMS.sql` script deletes the user before creating it again. Running the script `create_tables_YourDBMS.sql` drops all database tables before creating them again. This means you can run these scripts again during the test phases of your project development, without having to take extra cleanup steps.

The first time you run the `create_tables_YourDBMS.sql` script, you see harmless error or warning messages because there is nothing to delete.

If you are updating the schema for an existing backing store, see Updating Existing Backing Store Schema.

Procedure
1. As desired, change the default TIBCO BusinessEvents user credentials: Open the `initialize_database_YourDBMS.sql` script for editing and change the default username and password. The documentation uses the default username (`BE_USER`) and password (`BE_USER`)
2. Open a command window in the BE_HOME/bin directory (the default location of the scripts), and the appropriate command for your DBMS at the prompt:
   - For Oracle:

         sqlplus sys_user/sys_user_password@SID @initialize_database_oracle.sql

     Type `exit` to exit and commit.

   - For SQL Server:

         osql -S Your-Server -U sys_user -P sys_user_password -n -i initialize_database_sqlserver.sql

   - For MySQL:

         mysql -u username -p database_name < initialize_database_mysql.sql

   - For PostgreSQL:

         psql -U username -d database_name -f initialize_database_postgres.sql

   - For Cassandra:

         cqlsh -f $BE_HOME/bin/initialize_database_cassandra.cql

   This script creates the TIBCO BusinessEvents database user. This user must be used to run the other scripts. You see messages like the following:

       User dropped.User created.Grant succeeded.

   Tip: Using your database product, you can configure additional users to access the database, in addition to this user.

## Run the Create Tables Scripts as the TIBCO BusinessEvents User

Log in as the TIBCO BusinessEvents user, `BE_USER` by default and run a script to create non-project specific tables.

Procedure
1. Open the command prompt and navigate to the BE_HOME/bin directory (the default location of the scripts).
2. On the command prompt, type the appropriate command for your DBMS:
   - For Oracle:

         sqlplus BE_USER/BE_USER@SID @create_tables_oracle.sql

     Type `exit` to exit and commit.

   - For SQL Server:

         osql -S Your-Server –d Your-DB -U BE_USER -P BE_USER -n -i @create_tables_sqlserver.sql

   - For MySQL:

         mysql -u BE_USER -p database_name < create_tables_mysql.sql

   - For PostgreSQL:

         psql -U username -d database_name -f create_tables_postgres.sql

   - For ActiveSpaces:

         tibdg -g <grid_name> -r <FTL_realm_URL> -s <BE_HOME>/bin/create_tables_as.tibdg

   - For Cassandra:

         cqlsh -k <keyspaceName> -u <username> -p <pwd> -f create_tables_cassandra.cql

   Use the credentials that are defined in the SQL files. By default those are: username `BE_USER`, with password `BE_USER`.

Result

You see various harmless error messages the first time that you run the script.

Note: TIBCO BusinessEvents Studio provides a wizard to configure the required properties and generate the project-schema-specific SQL scripts.

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.