The compatibility assessment is performed by an independent compatibility assessment engine, and its artifact is oceanbase-compat-engine.jar. The engine runs as a single-process command-line tool, does not rely on external services or resident processes. Tasks, statements to be assessed, collected information, and results are stored in a local task database. In full mode, collection, assessment, and reporting are completed in one pass. It can also be executed in phases or retried.
Component composition
Component |
Description |
|---|---|
| Assessment Engine | A single-process command-line tool that handles input collection, assessment parsing, report generation, and execution verification. |
| Local Task Database | By default, it is the directory under the current working directory.data/compat_engine.db(AccessDB), which stores tasks, statements, collection information, and assessment results. When performing phased operations on the same task, you must use the same file. |
| Built-in Rules | The compatibility determination rules provided with the engine are adapted to the target compatibility mode and version. |
| Custom Rule | External YAML rule files or directories, accessed via--custom-rulesLoad, used for supplementary determination (PATTERN/CUSTOM_REGEX) or filter statements (FILTERFor more information, see Custom rules. |
System architecture diagram
Process phases and data flow
The engine is organized into phases, which are connected through a local task database and do not rely on a persistent runtime state:
Phase |
--mode |
Behavior |
|---|---|---|
| Collection | collect |
During file input, SQL or mapper files are read and parsed. During database input, the source database is connected to extract object definitions and system information. The results are written to the target database. |
| Assessment | evaluate |
It parses statements according to the source dialect, generates results based on the target compatibility mode, target version, and applicable rules, and supports loading custom rules. |
| Report | report |
Aggregated task results are output as HTML or JSON; Mapper tasks include scan audit information. |
| Complete | full |
Performing collection, assessment, and report generation in sequence is equivalent to executing the three phases in that order. |
| Execution Verification | execute |
Connect to the target database for each statement in the existing task and submit them for execution one by one, recording the success status and errors. |
In full mode, only collection, assessment, and reporting are completed. When a target connection is provided, it can trigger a read-only verification of object existence, which is not equivalent to executing all SQL statements; statements are actually committed in execute mode. For the differences and definitions, see SQL execution verification.
Running form
- Single process, no external dependencies: Does not rely on database services or resident middleware. Task data is stored in a local SQLite database.
- Runtime environment: Linux or macOS, JDK 21. The JVM heap size is controlled using
JAVA_OPTS, for example,export JAVA_OPTS='-Xms256m -Xmx2g'. - Phased execution: A phase failure can be retried or re-executed separately. When operating on the same task in phases, the same
--dbmust be used. - Installation: Delivered with the release package. Extract and use it directly. For more information, see Install OMA.
Source and target
- Source: Distinguished by dialect, supporting Oracle, MySQL, PostgreSQL, SQL Server, TiDB, MariaDB, Sybase ASE, and OceanBase Oracle/MySQL tenants. Specify via
--source-type. For complete dialects, version tags, and default ports, see Overview of compatibility assessment. - Target:
oceanbase-oracleoroceanbase-mysql, specified via--targetand--target-ob-version. The target version will not automatically downgrade to a nearby version. For available values, see Overview of compatibility assessment. - Optional target database: Static assessment typically does not connect to the target database; when a target connection is provided, it can perform object existence verification (currently only supports Oracle-compatible mode directories).
executemode actually commits statements and should be performed in a dedicated validation environment.
Relationship with performance assessment
The compatibility assessment engine and the performance assessment program are two independent programs with separate version numbers. They do not share entry points, parameters, configuration files, task databases, or statistical structures. For the component structure and data flow of performance assessment, see Performance assessment system architecture.
Product form
For entry commands, running examples, and the complete parameter set, see Product form.