To generate a Workload Intelligence report, use the GenerateReport
program. GenerateReport
is a Java program that generates a report to display the results of Workload Intelligence. The Workload Intelligence report is an HTML page that displays the patterns identified in the workload.
The GenerateReport
program uses the following syntax:
java oracle.dbreplay.workload.intelligence.GenerateReport -cstr connection_string -user username -job job_name -top top_patterns -out filename java oracle.dbreplay.workload.intelligence.GenerateReport -version java oracle.dbreplay.workload.intelligence.GenerateReport -usage
-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.
-top
Specifies a number that indicates how many patterns to display in the report. The patterns are ordered by different criteria (number of executions, DB time, and length) and only the defined number of top results are displayed. Setting this value is optional; its default value is 10
.
-out
Specifies the name of the file (in HTML format) where the report is stored. Setting this value is optional; its default value is based on the job name specified in the -job
option.
-version
Displays the version information for the GenerateReport
program.
-usage
Displays the command-line options for the GenerateReport
program.
Example 14-5 shows how to generate a Workload Intelligence report using the GenerateReport
program.
Example 14-5 Generating a Workload Intelligence Report
java -classpath $ORACLE_HOME/rdbms/jlib/dbrintelligence.jar: $ORACLE_HOME/rdbms/jlib/dbrparser.jar: $ORACLE_HOME/jdbc/lib/ojdbc6.jar: oracle.dbreplay.workload.intelligence.GenerateReport -job wijobsales -cstr jdbc:oracle:thin:@myhost:1521:orcl -user workintusr -top 5 -out wijobsales.html