:

RAT – Workload Analyzer

I have recently been playing around with Real Application Testing (RAT) and as part of the replaying of a captured workload it is advisable to run the Workload Analyzer if you are using the APIs to replay the workload. This is required to identify any potential problems by analyzing the workload capture files in the replay directory.

Personally, running this on a Windows environment, I found that the command provided in the documentation did not work straight away. In the docs it’s like this which generates an error:

java -classpath $ORACLE_HOME/jdbc/lib/ojdbc5.jar:$ORACLE_HOME/rdbms/jlib/dbrparser.jar: $ORACLE_HOME/rdbms/jlib/dbranalyzer.jar:oracle.dbreplay.workload.checker.CaptureChecker /scratch/capture jdbc:oracle:thin:@myhost.mycompany.com:1521:orcl

Exception in thread “main” java.lang.NoClassDefFoundError: $ORACLE_HOME/rdbms/jlib/dbranalyzer/jar:
Caused by: java.lang.ClassNotFoundException: $ORACLE_HOME.rdbms.jlib.dbranalyzer.jar:
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: $ORACLE_HOME/rdbms/jlib/dbranalyzer.jar:.
Program will exit.

The command that worked for me was a slight alteration of the original:

java -classpath D:\Oracle\product\11.2.0\dbhome_11202\jdbc\lib\ojdbc5.jar;D:\Oracle\product\11.2.0\dbhome_11202\rdbms\jlib\dbrparser.jar;D:\Oracle\product\11.2.0\dbhome_11202\rdbms\jlib\dbranalyzer.jar; oracle.dbreplay.workload.checker.CaptureChecker U:\flash_recover_TESTDB\TEST\WRC jdbc:oracle:thin:@db1.domain..com:1521:TESTDB

The changes that I neede to make were:

1. colon (:) to semi-colon (;)

2. $ORACLE_HOME now has the full path

3. There are no spaces between the now semi-colons, apart from before this command oracle.dbreplay.workload.checker.CaptureChecker

Like it, share it...

Category: RAT


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *