16 The datastoreUtil Utility

Setting up Business Transaction Management Databases, instructed you to create database users for the sphere, performance, and transaction databases using the following suggested names:

This chapter assumes you are using the suggested names. If not, substitute your names as appropriate.

When you configure Business Transaction Management (see Initial Configuration of Business Transaction Management), the system automatically creates the appropriate database tables for these users, unless you choose to create them beforehand with the datastoreUtil Utility.

The datastoreUtil utility enables you to generate the DDL that you can use as input (with sqlplus) to create the necessary tables and views for Business Transaction Management. You can alternatively use datastoreUtil to connect to a database instance and create the tables and views directly.

Usage

To invoke the datastoreUtil utility, use a command window or shell to navigate to the tools directory of your Business Transaction Management installation and execute the datastoreUtil script that is appropriate for your operating system (either datastoreUtil.bat or datastoreUtil.sh).

After starting the utility, you can run any of the commands listed in Commands. For commands that have multiple arguments, you must call the arguments in the order described.

Commands

The datastoreUtil utility provides the following commands:

generateSchema (or generate)

Generates a DDL of the specified schema definition. You can use this command without being connected to a database.

generateSchema schemaType databaseType [[directory] targetSchema] -partition|-nopartition
  • schemaType – Specify one of the following schema types:

    • sphere – Creates a schema for the sphere database (the sphereDB user).

    • exm – Creates a schema for the transaction database (the transactionDB user).

    • performance – Creates a schema for the performance database (the measurementDB user).

    • monitorgroup – Creates a schema for a monitor group.

    • msglog – Creates a schema for the system message log.

  • databaseType – Specify oracle. This is the only supported value.

  • directory – Specify a location to generate the DDL file (defaults to the local directory).

  • targetSchema – Optional. This argument scopes the generated schema to a specific user, for example, sphereDB, transactionDB, or measurementDB.

  • -partition or -nopartition – This flag is required if your specified schemaType is performance or monitorgroup. If your specified schemaType is any other value, this flag is not required and is ignored if you use it.

    If you are using Oracle Enterprise Edition, you can create a performance or monitorgroup schema that takes advantage of Oracle's partitioning feature by specifying the -partition flag. If you do not want to take advantage of this feature, or if your Oracle edition does not provide the partitioning feature, you must specify the -nopartition flag (if you are creating a performance or monitorgroup schema).

connect

Connect to a database using the user-specified connection information.

connect databaseType|filename
  • databaseType – Specify oracle. This is the only supported value.

  • filename – Specify a file output by the saveConnection command.

Use the connect command to enter database connection information and connect to the database. You must have the following information for the database to which you want to connect:

  • driver name

  • username

  • password

  • URL connection string

Once connected, you might issue the saveConnection command to save the connection information within a file. The next time you want to connect to the same database, you can provide the file name with the connect command. If you provide the database type, the utility automatically selects the corresponding default driver.

createSchema (or create)

Create the specified schema within the connected database.

createSchema schemaType -partition|-nopartition
  • schemaType – Specify one of the following schema types:

    • sphere – Creates a schema for the sphere database (the sphereDB user).

    • exm – Creates a schema for the transaction database (the transactionDB user).

    • performance – Creates a schema for the performance database (the measurementDB user).

    • monitorgroup – Creates a schema for a monitor group.

    • msglog – Creates a schema for the system message log.

  • -partition or -nopartition – This flag is required if your specified schemaType is performance or monitorgroup. If your specified schemaType is any other value, this flag is not required and is ignored if you use it.

    If you are using Oracle Enterprise Edition, you can create a performance or monitorgroup schema that takes advantage of Oracle's partitioning feature by specifying the -partition flag. If you do not want to take advantage of this feature, or if your Oracle edition does not provide the partitioning feature, you must specify the -nopartition flag (if you are creating a performance or monitorgroup schema).

close

Close a connection previously opened through the connect command.

close

exit

Exit the utility.

exit

help

Use the help command to view help for all commands, or enter a command name after help to receive help for a single command.

help | help command