Compatibility assessment is performed exclusively through the command line. The entry point is oceanbase-compat-engine.jar compat:
Entry |
Procedure |
Feature |
|---|---|---|
oceanbase-compat-engine.jar compat |
Command line | Compatibility Assessment (Collection, Evaluation, Reporting, Execution Verification) |
Relationship with performance assessment
The compatibility assessment engine and performance assessment are two independent programs with separate version numbers. They do not share entry points, parameters, configuration files, task libraries, or statistical structures. For information about the entry point and release package structure of performance assessment, see Performance assessment product form. For installation instructions, see Install OMA.
Command-line format
java -jar oceanbase-compat-engine.jar compat [parameters]
--help and --version are standard options. The following parameters are listed by function.
Examples
Full database assessment:
java -jar oceanbase-compat-engine.jar compat \
--mode full --task-name oracle_db \
--type database --source-type oracle \
--host 10.10.10.1 --port 1521 --service-name ORCL \
--username oms_user --password-env OMA_DB_PASSWORD \
--schema APPUSER --collect-mode full \
--target oceanbase-oracle --target-ob-version 4.4.2 \
--report-lang zh --output /data/oma/reports/oracle-db.html
Examples for file assessment, Mapper assessment, and various source assessments are provided in Assess SQL statement compatibility and Object and metadata assessment.
General parameters
Parameter |
Default Value |
Description |
|---|---|---|
--mode |
full |
collect、evaluate、report、full、execute |
-n, --task-name |
collect/full can generate | Required for evaluate, report, and execute operations. Indicates an existing task. |
--force |
false |
Request forced re-execution, subject to phase verification. |
--retry |
false |
Request Retry Failed Phase, Subject to Phase Verification |
--db |
./data/compat_engine.db |
Task database file; must point to the same file for phased operations |
--object-type |
Not specified | Object type filter. You can specify multiple values. |
-q, --quiet |
false |
Suppress progress output |
--force-inline-progress |
false |
Force single-line progress display |
-v, --verbose |
false |
Detailed Output Option |
--parallel |
1 |
Concurrency |
--log-file |
logs/oma.log |
Log Path |
Input source
Parameter |
Default Value |
Description |
|---|---|---|
--type |
Automatically Determine | file、database; If left empty, databases are prioritized by host. Otherwise, files are prioritized by source. |
-t, --source-type |
oracle |
Source dialect. For valid built-in values, see Overview of compatibility assessment. |
--source-format |
sql |
Availablesql、mybatis、ibatis |
-s, --source |
None | File or directory path in file mode |
--source-version-tag |
None | Source version tag, normalized by source dialect. |
--source-major-version |
None | Only PostgreSQL file mode. The value must be a positive integer. |
Source database connection
Parameter |
Default Value |
Description |
|---|---|---|
--host |
None | Source database host. The database mode is required. |
--port |
By Dialect | Source port. For more information, see Source table. |
--database |
None | The database mode is required for PostgreSQL, SQL Server, and Sybase databases. For MySQL databases, it specifies the database. |
--service-name |
None | Oracle Service Name |
--sid |
None | Oracle SID or service name. If both are provided, the service name is used for connection. |
--username |
None | Username of the source database. This parameter is required for the database schema. |
--password |
None | Source Database Password |
--password-env |
None | The name of the environment variable that stores the source password. If specified, the password is read from the environment. An error is returned if the variable is not defined. |
--schema |
Not specified | Schema or a comma-separated list of schemas; MySQL database as a database alias |
--include-system |
false |
The request contains system schemas. |
--exclude-schema |
None | Exclude schema. Can be specified multiple times. |
--sysdba |
false |
Oracle SYSDBA connection options |
Collection, assessment, and reporting
Parameter |
Default Value |
Description |
|---|---|---|
--collect-mode |
full |
Database information collection mode: full, object, or system. This parameter is not applicable to the phase execution mode. |
--collect-categories |
None | Fine-grained collection categories separated by commas, such as object, system, tables, indexes, views, procedures, triggers, constraints, sequences, synonyms, dblinks, tablespaces, slowqueries, sessions, locks, statistics, and privileges. |
--query-timeout |
120 |
Timeout Seconds for Database Collection Queries |
--recent-sql-max |
1000 |
Maximum Number of Rows Collected in Recent SQL Queries |
--recent-sql-hours |
20 |
Number of Hours in the Recent SQL Time Window |
--target |
None | Required. The value must be oceanbase-oracle or oceanbase-mysql. |
--target-ob-version |
4.4.2 |
For the current available versions, see Overview of compatibility assessment. |
--custom-rules |
None | Custom YAML rule files or directories |
-o, --output |
Automatically Generated Path | Report Output File Path |
-f, --format |
html |
Report format. Valid values: html and json. |
--report-lang |
en |
Report language: zh/en |
--report-detail-limit |
500 |
Maximum report details. 0 indicates no limit. |
Target database connection
Parameter |
Default Value |
Description |
|---|---|---|
--ob-host |
None | Target host. This parameter is required for the execute operation. |
--ob-port |
None | The execute parameter must be explicitly specified. The commonly used OBProxy port is 2883. |
--ob-user |
None | Target username. Required for execute operations. Typically, a tenant is represented as user@tenant#cluster. |
--ob-password |
None | Target password. Required for the execute operation. |
--ob-tenant |
None | Optional target tenant ID |
For object verification in evaluate/full and execution behavior in execute, see SQL execution validation. For custom rule syntax, see Custom rules.