Generating a Workload Model

To generate a workload model, use the BuildModel program. BuildModel is a Java program that reads data from a captured workload (this data must be generated by the LoadInfo program) and generates a model that describes the workload. This model can then be used to identify frequent template patterns that occur in the workload.

The BuildModel program uses the following syntax:

java oracle.dbreplay.workload.intelligence.BuildModel -cstr connection_string -user username -job job_name

java oracle.dbreplay.workload.intelligence.BuildModel -version

java oracle.dbreplay.workload.intelligence.BuildModel -usage

The BuildModel program supports the following options:

  • -cstr

    Specifies the JDBC connection string to the database where Workload Intelligence stores the information and intermediate results required for execution (for example, jdbc:oracle:thin@hostname:portnum:ORACLE_SID)

  • -user

    Specifies the database username. The user must have certain privileges for using Workload Intelligence.

    For information about creating a database user with the appropriate privileges, see "Creating a Database User for Workload Intelligence".

  • -job

    Specifies a name that uniquely identifies the Workload Intelligence job.

  • -version

    Displays the version information for the BuildModel program.

  • -usage

    Displays the command-line options for the BuildModel program.

Example 14-3 shows how to generate a workload model using the BuildModel program.

Example 14-3 Generating a Workload Model

java -classpath $ORACLE_HOME/rdbms/jlib/dbrintelligence.jar:
$ORACLE_HOME/rdbms/jlib/dbrparser.jar:
$ORACLE_HOME/jdbc/lib/ojdbc6.jar:
oracle.dbreplay.workload.intelligence.BuildModel -job wijobsales -cstr
jdbc:oracle:thin:@myhost:1521:orcl -user workintusr