Each database store that is configured for an EMS server includes a configuration parameter pointing to a database. The EMS Schema Export Tool creates and exports database tables for the database stores. Database administrators can use the Schema Export Tool to selectively export and tune schemas to suit your database and messaging system.
The Schema Export Tool is a JAR file, tibemsd_util.jar, located in the same directory as
tibemsd. Command line options, described in
Table 50, 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.
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 tool can perform the selected actions on all database stores, or only on specific stores. The Schema Export Tool can also print the database tables it creates to the console, or export them either to the database or to a specified file.
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:
|
|
|
The absolute path to the tibemsd.conf or tibemsd.json file. For example, on a UNIX system:
This tool supports JSON configuration files only when run on those platforms for which Central Administraion 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.
|
|
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.
|
|
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.
|
-store storename=create|update|drop
|
Create, update, or drop the schema for one or more specific stores that are named in the stores configuration file.
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.
|
|
Create all the stores found in the stores configuration file. Note that this option drops any existing configurations when creating the new stores.
|
|
|
|
|
|
|
In 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:
In 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: