Initializing the Database and Generate Non-Project Tables
Ensure that you have done all earlier tasks that may pertain to your case. See Cases Those 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.
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 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
- 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
) - Open a command window in the
BE_HOME/bin
directory (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. - For Oracle:
Run the Create Tables Scripts as the TIBCO BusinessEvents User
Log on as the TIBCO BusinessEvents user,
BE_USER
by default and run a script to create non-project specific tables.
- Procedure
- Open a command window in the
BE_HOME/bin directory (default location of the scripts), and type the appropriate command for your DBMS at the prompt:
- 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 passwordBE_USER
. - For Oracle:
You see various harmless error messages the first time you run the script.