![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
The EMS Schema Export Tool must be used to export database tables when one or more database stores are configured. That is, if any stores of type dbstore are configured, you must export the database schema before starting the EMS server.The Schema Export Tool is a JAR file, tibemsd_util.jar, located in the same directory as tibemsd. Command line options, described in Table 57, determine whether database tables are created or dropped, and whether they are printed to the console, saved to a file, or exported to the database.
• Configure the global database store parameters for the EMS server. The parameters that configure the global database store settings begin with dbstore_. See Configuration in tibemsd.conf for details about these parameters.
• Configure at least one store of type dbstore. See Configuration in stores.conf for more information about configuring database stores.When it is invoked, the Schema Export Tool accepts the tibemsd.conf or tibemsd.json file and reviews the database store parameters, then parses the stores configured, either in the stores.conf file or in the JSON configuration file. Depending on the options specified when it was invoked, the Schema Export Tool will create, drop, or update the database tables for the stores of type dbstore that are configured.The Schema Export Tool is invoked from the command line. The tool can be invoked from its directory, or by giving the absolute path to the tibems_util.jar file. For example:
Table 57 EMS Schema Export Tool options -tibemsdconf pathname /opt/tibco/ems/8.4/samples/config/tibemsd.confThis tool supports JSON configuration files only when run on those platforms for which Central Administration is supported. For a list of supported platforms, see the supported platforms list for Central Administration in the TIBCO Enterprise Message Service Installation guide.Text-based tibemsd.conf files are supported on all platforms. -exporttofile Export the schema to a file named store-name.ddl.log, where store-name is the name of the database store. If multiple database stores are configured, then one file is created for each database store.If neither exporttofile nor export option is included, the schema export tool prints the schema to the console.If both -eporttofile and -export are included, the Schema Export Tool exports the database schema to both locations. -export If neither export nor exporttofile option is included, the schema export tool prints the schema to the console.If both -eport and -exporttofile are included, the Schema Export Tool exports the database schema to both locations. If you choose the create option for a schema that already exists, the Schema Export Tool recreates the schema.Note that create prints the schema to screen but does not deploy it. You must use export or exporttofile in order to implement the schema. This example shows how the Schema Export Tool can be invoked from any directory by giving the absolute path to the tibemsd_util.jar:$ java -jar /opt/tibco/ems/8.4/bin/tibemsd_util.jar -helpIn this example, the Schema Export Tool creates and exports database schemas for all the stores found in the stores.conf that is set in the specified tibemsd-mssqlserver.conf file:java -jar /opt/tibco/ems/8.4/bin/tibemsd_util.jar -tibemsdconf /opt/tibco/ems/8.4/samples/config/tibemsd.conf -createall -exportIn this example, the Schema Export Tool exports the database schema for the $sys.failsafe store to the database:jar -jar /opt/tibco/ems/8.4/bin/tibemsd_util.jar -tibemsdconf /opt/tibco/ems/8.4/samples/config/tibemsd.conf –export –store \$sys.failsafe=createIn this example, the Schema Export Tool writes the database schema for the $sys.failsafe store to the file $sys.failsafe.ddl.log:$ jaav -jar /opt/tibco/ems/8.4/bin/tibemsd_util.jar -tibemsdconf /opt/tibco/ems/8.4/samples/config/tibemsd.conf –exporttofile –store \$sys.failsafe=createIn this example the Schema Export Tool creates and exports the database schema for the store mystore1, but drops the schema associated with mystore2 and exports the change:java –jar /opt/tibco/ems/8.4/bin/tibemsd_util.jar –tibemsdconf /opt/tibco/ems/8.4/samples/config/tibemsd.conf -store mystore1=create -store mystore2=drop -export
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |