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.