Basic configuration requirements
OMA requires a Java 21 runtime environment.
OMA is delivered as a release package. Decompress it to use it. The name and download URL of the release package vary by product. The compatibility assessment engine is packaged as oceanbase-compat-engine.jar. For the structure of the performance assessment package, see Performance assessment product form.
Procedure
After decompressing the release package, run the following command to view the complete parameter description for compatibility assessment:
java -jar oceanbase-compat-engine.jar compat --help
Quickly assess an SQL file
Prepare an UTF-8 SQL file, for example, /data/oma/input.sql, and run the following command:
java -jar oceanbase-compat-engine.jar compat \
--mode full \
--task-name sql_demo \
--type file \
--source-type oracle \
--source-format sql \
--source /data/oma/input.sql \
--target oceanbase-oracle \
--target-ob-version 4.4.2 \
--report-lang zh \
--output /data/oma/reports/sql-demo.html
Replace the path with your actual input file and a writable output location. The command will sequentially collect data, perform the assessment, and generate a report. After completion, view the HTML report at the path specified in the command-line output.
The default task database is data/compat_engine.db in the current working directory, and the default log file is logs/oma.log. When performing phased operations on the same task, you must use the same SQLite database.
Runtime environment for the replay component
The performance assessment program is delivered as oma.jar. Run the JAR directly without relying on the Bash packaging script; Java 21 is also required. After placing the delivered JAR (the artifact name may include a version number, such as oma-5.0.0.jar; the following commands will refer to it uniformly as oma.jar) in your working directory, use the following command to verify that the program is available:
java -Xmx2g -jar oma.jar analyze --help
java -Xmx2g -jar oma.jar replay --help
java -Xmx2g -jar oma.jar replay --version
-Xmx2g is an example maximum heap size. Adjust it based on log scale and concurrency requirements. JVM parameters go before -jar; running java directly does not automatically read JAVA_OPTS. You must obtain the plugin JARs separately for parsing plugin formats such as TiDB General Log, Oracle WCR, and tcpdump, and explicitly specify them using --plugins-dir <actual-plugin-directory>. The main JAR does not include plugins by default.
For log formats, parameters, and statistical metrics, see Performance assessment overview.