Configuring a Database for the Engine
Checkpoint activity and other persistence features require the Engine Persistence Mode (bw.engine.persistenceMode) to be configured for a
datastore or
group mode. When the Engine Persistence Mode property is configured for
datastore or
group mode, the engine requires a database configuration.
- Procedure
- Scripts for creating the engine database for various database types are at
BW_HOME/config/dbscripts/engine. Based on whether the Engine Persistence Mode property is configured fordatastoremode orgroupmode, complete one of the following steps:- If the Engine Persistence Mode property is set to
datastoremode, run the bundled scriptscreate.sqlandcreate-scp.sqlto create the engine database. - If the Engine Persistence Mode property is set to
groupmode, run the bundled scriptscreate.sqlandcreate-dcp.sqlto create the engine database.
Note: Thecreate.sql,create-scp.sql, andcreate-dcp.sqlscripts are available for each vendor directory in the{BW_HOME}\config\dbscripts\enginedirectory. - If the Engine Persistence Mode property is set to
- To change the Engine Persistence Mode, run the utility to set the Persistence Mode property,
bw.engine.persistenceModeto datastore or group, and then configure the engine database connection details.bw.engine.persistenceMode=[datastore | group]
Note: Before updating the AppSpace configuration, you must stop the AppSpace if it is running.The database connection configuration can be specified at the AppSpace or the AppNode level. The database connection details specified at the AppSpace level are applied to all AppNodes within the AppSpace. The configuration specified at the AppNode level takes precedence over the configuration specified at the AppSpace level.When the Engine Persistence Mode property is set to group, the database connection configuration must be specified only at the AppSpace level.
When the Engine Persistence Mode property is set to datastore, the database connection configuration cannot be shared by two or more AppNodes in the same AppSpace. As a result, the database connection configuration can be specified at the AppSpace level only if the AppSpace contains a single AppNode. For an AppSpace that contains two or more AppNodes, each AppNode requires a unique database and the database connection configuration must be specified at the AppNode level.
- To set database configuration properties at the AppSpace level, follow these steps:
Note: Ensure you are using a different database instance for each AppSpace. To do this with a single database, create a tablespace or schema for each AppSpace.
- Copy the existing AppSpace
config.inifile (in the root of the AppSpace folder), or the AppSpaceconfig.initemplate fileappspace_config.ini_template(inBW_HOME/config/) to a temporary location. - Edit the Engine Persistence Mode property,
bw.engine.persistenceMode, and set it to datastore or group.bw.engine.persistenceMode=[datastore | group]
- Configure the following database connection properties in the
BWEngine Database Configuration section of the
config.inifile:#------------------------------------------------------------------------------ # Section: BW Engine Database Configuration. # # The properties in this section are applicable to the BW Engine database. # All properties in this section are required when the BW Engine # property "bw.engine.persistenceMode" set to "datastore" or "group". # ------------------------------------------------------------------------------ # BW Engine Database Driver. bw.engine.db.jdbcDriver=org.postgresql.Driver # BW Engine Database URL. bw.engine.db.url=jdbc:postgresql://<servername>:<portnumber>/<dbname> # BW Engine Database User Name. bw.engine.db.userName=user1 # BW Engine Database User Password. bw.engine.db.password= # BW Engine Database Connection Pool Size. bw.engine.db.maxConnections=15
When setting the password property (bw.engine.db.password), the default format is plain text. Run the commandbwadmin obfuscate, or the commandbwobfuscator, from the command line to encrypt the password; use the generated encrypted text as the password.Note: The BWAdminbwenginedbcommand displays BWEngine datastore configuration settings.
- Copy the existing AppSpace
- To set the database for datastore mode at the AppNode level, follow these steps:
- Copy the existing AppNode
config.inifile (in the root of the AppNode folder) to a temporary location. - Set Engine Persistence Mode property,
bw.engine.persistenceModeto datastore and configure the engine database connection details.bw.engine.persistenceMode=[datastore]
- Configure the engine database connection properties in the
BWEngine datastore configuration section of the
config.inifile. By default, the AppNodeconfig.inifile does not contain these properties. Copy these properties from the AppSpaceconfig.initemplate file,appspace_config.ini_template, inBW_HOME/configto the AppNodeconfig.inifile and provide the database connection details.
- Copy the existing AppNode
- Use one of the following
configadmin commands to push the configuration to the AppSpace or the AppNode:AppSpace:bwadmin[admin] > config -d myDomain -a myAppSpace -cf <temporaryLocation>/config.iniAppNode:bwadmin[admin]> config –d myDomain –a myAppSpace -n myAppnode –cf <temporaryLocation>/config.ini - Restart the AppSpace.
-
Note: Before you clean the engine database, ensure that you have backed up all important data.To clean the engine database that is configured for datastore mode, run the
drop.sqlanddrop-scp.sqlscripts. If the engine database is configured for group mode, run thedrop.sqlanddrop-dcp.sqlscripts.
- Editing an AppSpace Configuration
- Editing an AppNode Configuration