OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Migration Assessment

V4.2.3Enterprise Edition

  • Product Introduction
    • Overview
    • Application scenarios
    • System architecture
    • Product form
  • Install OMA
  • Compatibility assessment
    • Overview
    • Assess the compatibility with objects
    • Assess the compatibility with SQL statements
    • Assess the compatibility with business code
    • Export SQL statements from an OceanBase database
    • Database assessment
      • Overview
      • Assess an Oracle database
      • Assess a MySQL database
      • Assess a TiDB database
      • Assess a PostgreSQL database
      • Assess a DB2 LUW database
  • Performance assessment
    • Standalone edition
      • Overview
      • Assess the performance differences 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

Download PDF

Overview Application scenarios System architecture Product form Install OMA Overview Assess the compatibility with objects Assess the compatibility with SQL statements Assess the compatibility with business code Export SQL statements from an OceanBase database Overview Assess an Oracle database Assess a MySQL database Assess a TiDB database Assess a PostgreSQL database Assess a DB2 LUW database Overview Assess the performance differences 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
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Migration Assessment
  3. V4.2.3
iconOceanBase Migration Assessment
V 4.2.3Enterprise Edition
Enterprise Edition
  • V 4.4.2
  • V 4.2.5
  • V 4.2.4
  • V 4.2.3
  • V 4.2.2
  • V 4.2.0
  • V 3.3.2

Export SQL statements from an OceanBase database

Last Updated:2026-04-14 07:41:18  Updated
share
What is on this page
Background
Command

folded

share

OceanBase Migration Assessment (OMA) allows you to export DDL and SQL statements from an OceanBase database to a file to facilitate error locating.

Background

Run start.sh with reference to the sample command in this topic. For more information about the parameters in the script, see Product form. In Microsoft Windows, replace sh bin/start.sh with start.bat.

Command

sh bin/start.sh \
# The task name, which can be set to any value.
--name dump_ob \
# A fixed value. The value is DUMP.
--mode DUMP \   
# The export type. Valid values: SQL, DDL, and ALL. SQL indicates that only SQL statements are exported. DDL indicates that only DDL statements are exported. ALL indicates that SQL and DDL statements are exported.
--dump-type  ALL \
# A fixed value.
--from-type DB \  
# The type of the source database. Valid values: OBORACLE and OBMYSQL.
--source-db-type OBORACLE \
# The version of the source OceanBase database.
--source-db-version 3.1.20 \
# The IP address of the source OceanBase database.
--source-db-host xxx.xxx.xxx.xxx \
# The port number of the source OceanBase database.
--source-db-port port \  
# The complete username of the source OceanBase database. We recommend that you use the SYS user or the root user.
--source-db-user username \
# The password of the source OceanBase database.
--source-db-password password \
# The schema to be exported.
--schemas "OMT,TEST" \
# The time interval of SQL statement collection, in seconds.
--collect-interval 5 \  
# The type of the object to be exported.
--objects "TABLE,INDEX,VIEW,SEQUENCE,SYNONYM,FUNCTION,PROCEDURE,PACKAGE,PACKAGE\ BODY,TRIGGER,TYPE,TYPE\ BODY" \  
# The start time of SQL statement collection.
# The default value is a timestamp one hour before the current time, which indicates that only the SQL statements executed within the last hour are collected.
--collect-start-time "2021-12-29\ 23:23:00" \
# The end time of SQL statement collection. The default value is the current time, which indicates that the collection is performed only once.  
--collect-end-time "2021-12-29\ 23:43:00"

After you run the preceding command, OMA generates an export file in the ./dump/ directory. The file name is corresponding to the task name.

Previous topic

Assess the compatibility with business code
Last

Next topic

Overview
Next
What is on this page
Background
Command