OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Assessment

V5.0.0Enterprise Edition
  • What's New
  • Product Introduction
    • Overview
    • Application scenarios
  • Install OMA
  • Compatibility assessment
    • Overview
    • System architecture
    • Product form
    • Object and Metadata Assessment
    • Assess SQL statement compatibility
    • Sybase ASE assessment
    • Custom rules
    • Database assessment
      • Overview of Database Assessment
      • Assess an Oracle database
      • Assess a MySQL database
      • Assess a TiDB database
      • Assess a PostgreSQL database
    • SQL execution verification
    • Mapper Scan Audit
    • Special Identification and Declaration Association
  • Performance assessment
    • Standalone edition
      • Overview
      • System architecture
      • Product form
      • Assess the performance difference between an Oracle database and an OceanBase database
      • Assess the performance differences between a MySQL database and an OceanBase database
      • Assess the performance differences between different versions of OceanBase Database
      • Log parsing
      • Replay execution
      • Performance statistics and reports
  • Release Notes
    • OMA V5.0.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Assessment
  3. V5.0.0

SQL execution verification

Last Updated:2026-11-19 09:12:21

Static assessment versus actual execution
CLI SQL execution
Preprocessing and skipping strategies
Result labels
Assessment report
Issue severity
Classification ledger
Statistical metrics

This topic describes how to verify statements executed in the actual target OceanBase database and how to read an assessment report. Static assessment does not rely on the target database, and their conclusions cannot replace each other.

Static assessment versus actual execution

Static assessment reads SQL statements, parses their structures, and applies rules, typically without connecting to the target database for execution. Execution verification, on the other hand, submits statements to the actual target OceanBase database and records whether they succeed or report errors.

The full mode only completes data collection, assessment, and reporting. When a complete target connection is provided for evaluate or full, it can trigger a read-only check for object existence; this does not equate to running all SQL statements.

Object verification uses the target database's object catalog and dependency information. Currently, it only supports object verification for catalogs in Oracle-compatible mode.

CLI SQL execution

To execute for an existing task:

java -jar oceanbase-compat-engine.jar compat \
  --mode execute --task-name mapper_demo \
  --ob-host <target host> --ob-port 2883 \
  --ob-user 'user@tenant#cluster' --ob-password '<target password>'

The task name must match the one used in the collection task. All parameters --ob-host, --ob-port, --ob-user, and --ob-password are required, with the port needing to be explicitly specified.

The CLI sequentially reads existing statements, replaces question mark placeholders with the string literal '1111', injects execution hints into top-level SELECT/WITH statements, then connects to the target database to execute them. It records the success status, error codes, and error messages. Question marks in strings, quoted identifiers, and comments are not replaced.

If --custom-rules is provided, statements that hit a FILTER will be skipped during execution. Statements that hit user-defined rules will not be executed but will be recorded as having inconsistent execution results. For rule syntax, see Custom rules. After execution, a dependency object existence check is also performed.

CLI execution links may actually perform DDL or write operations, which should be verified using dedicated target execution.

Preprocessing and skipping strategies

Project
Behavior
Blank SQL Do not execute
Dynamically Expand Synthetic Segments Mark as skipped and do not commit to the target database
ALTER、DROP、TRUNCATE、RENAME TagDDL_SKIPPED, not executed
CREATE May Execute
Binding placeholder Specify a string literal.'11111', retain question marks within strings, quoted identifiers, and comments
commit;Text Rewrite asROLLBACK;
Top-level SELECT/WITH Inject Execution Hint
Transaction Disable auto-commit and roll back on exit.

Implicitly committed statements such as DDL are not guaranteed to be undone if a rollback occurs.

Result labels

Tag
Meaning
SQL_SYNTAX_OK The submission was executed successfully.
DDL_SKIPPED Skipped by DDL Strategy
OBJECT_NOT_EXIST_TABLE_VIEW Error categorized as missing table or view
OBJECT_MISSING_SEQUENCE、OBJECT_MISSING_IDENTIFIER Missing sequence or identifier
NON_ORACLE_* Error categories corresponding to non-Oracle dialect features
PARAM_* Error categories related to test parameters or data constraints
MANUAL_REVIEW_REQUIRED Uncategorized Items Requiring Manual Judgment

Labels are categorized based on error codes, messages, and SQL characteristics. Fixed test values are used for placeholders; execution results cannot replace validation of business parameters, business data, or complete transaction scenarios.

Assessment report

Assessment reports support HTML and JSON formats, with the report language accepting zh or en. The default maximum detail count is 500; 0 indicates no limit on details. This setting is for report display and does not limit the total number of scanned statements.

The report displays a compatibility overview, object details, issue levels, causes and recommendations, as well as available scale and database information, based on the actual input and collection results. Mapper input additionally provides scan audit information. File assessment alone will not generate source database scale, session, or permission data out of thin air.

Issue severity

Level
Reading Mode
ERROR View specific rules, reasons, and sources to address static assessment issues or corresponding errors.
WARNING Check the specific reasons for the items that require modification, pending verification, or pending environment validation. Do not assume that they are not supported.
INFO Low-priority or informational items should still be checked according to the rule description.

If parsing fails, diagnostic information such as SQL-PARSE-DIAGNOSTIC is retained. For prompts that require verification for specific target versions, output them as WARNING; do not write that the database already supports the declaration, see Special identification and declaration association.

Classification ledger

The report export provides four types of CSV files: Pending Target Database Run Verification, Static Confirmation Issues, Database Confirmed Errors, and Low Priority. The ledger can include fields such as original SQL, Mapper tag XML, file source, statement identifier, rule reason, runtime error, and suggestions.

Statistical metrics

The statistical metrics for different display locations need to be understood separately:

  • The object overview in HTML/JSON reports is summarized by object status; the compatible count is the total number of objects minus the number of ERROR objects and WARNING objects.
  • The issue severity distribution uses the number of issues, which is not the same dimension as the number of error objects or warning objects.
  • Files scanned for auditing, logical statements, SQL variants, and items pending manual re-scanning are different metrics. The compatibility rate should be read in conjunction with scan coverage and diagnostics.

A reassessment will clean up old execution records. When a new run confirmation is required, the verification must be executed again.

Previous topic

Assess a PostgreSQL database
Last

Next topic

Mapper Scan Audit
Next
on this page
Static assessment versus actual execution
CLI SQL execution
Preprocessing and skipping strategies
Result labels
Assessment report
Issue severity
Classification ledger
Statistical metrics