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 Best Practices

All Versions

  • Deploy
    • Configuration guide for read-write splitting in AP scenarios
    • Best practices for read-write splitting
  • Migrate
    • Data transfer solutions in OceanBase Database
    • Overview on data migration
    • Best practices for importing data files to OceanBase Database
    • Best practice for migrating data from other databases to OceanBase Database
    • Massive data migration strategy
    • Best practices for migrating data from MyCat to OceanBase Database
    • Best practices for migrating PostgreSQL to OceanBase MySQL-compatible mode
  • Route
    • ODP routing best practices
  • Table Design
    • Best practices for table design and index optimization
    • Best practices for creating indexes on large tables
    • Best practices for database development
  • Develop
    • Best practices for connecting Java applications to OceanBase Database
    • Best practices for integrating Spark Catalog with OceanBase Database
    • Best practices for achieving optimal performance in batch DML using JDBC and OBServer
    • Best practices for bulk data cleanup in OceanBase Database
    • Best practices for PDML processing in OceanBase Database
    • Best practices for hot tables in OceanBase Database
    • Best practices for auto-increment columns and sequences in OceanBase Database
  • Manage
    • Best practices for resource throttling
    • Best practices for data load balancing
    • Best practices for security certification
    • Best practices for access control
    • Best practices for data encryption
  • Diagnose
    • Best practices for log interpretation in common scenarios
    • Best practices for end-to-end tracing
    • Best practices for using obdiag to collect performance information
    • Best practices for using obdiag to collect diagnostic information of parallel and slow SQL statements
    • Best practices for troubleshooting OceanBase Database performance issues
  • Performance Tuning
    • Best practices for handling slow queries
    • Best practices for collecting statistics to generate an efficient execution plan
    • Best practices for updating hotspot rows
    • Best practices for large object storage performance
    • Best practices for semi-structured storage performance
    • Best practices for OceanBase materialized views
  • Cloud Database
    • Best practices for achieving high availability through cross-cloud active-active deployment
    • High availability through primary and standby databases across clouds
    • High host CPU usage
    • Best practices for read/write splitting in OceanBase Cloud

Download PDF

Configuration guide for read-write splitting in AP scenarios Best practices for read-write splitting Data transfer solutions in OceanBase Database Overview on data migration Best practices for importing data files to OceanBase Database Best practice for migrating data from other databases to OceanBase Database Massive data migration strategy Best practices for migrating data from MyCat to OceanBase Database Best practices for migrating PostgreSQL to OceanBase MySQL-compatible mode ODP routing best practices Best practices for table design and index optimization Best practices for creating indexes on large tables Best practices for database development Best practices for connecting Java applications to OceanBase Database Best practices for integrating Spark Catalog with OceanBase Database Best practices for achieving optimal performance in batch DML using JDBC and OBServer Best practices for bulk data cleanup in OceanBase Database Best practices for PDML processing in OceanBase Database Best practices for hot tables in OceanBase Database Best practices for auto-increment columns and sequences in OceanBase Database Best practices for resource throttling Best practices for data load balancing Best practices for security certification Best practices for access control Best practices for data encryption Best practices for log interpretation in common scenarios Best practices for end-to-end tracing Best practices for using obdiag to collect performance information Best practices for using obdiag to collect diagnostic information of parallel and slow SQL statements Best practices for troubleshooting OceanBase Database performance issues Best practices for handling slow queries Best practices for collecting statistics to generate an efficient execution plan Best practices for updating hotspot rows Best practices for large object storage performance Best practices for semi-structured storage performance Best practices for OceanBase materialized views Best practices for achieving high availability through cross-cloud active-active deployment High availability through primary and standby databases across clouds High host CPU usage Best practices for read/write splitting in OceanBase Cloud
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 Best Practices
  3. master
iconOceanBase Best Practices
master
  • master

Data transfer solutions in OceanBase Database

Last Updated:2025-06-11 05:52:43  Updated
share
What is on this page
Data import and export
Primary/Standby synchronization
Archive-based deployment
Network-based deployment
Data migration and synchronization
OMS
CDC
Comparison of migration solutions

folded

share

This topic describes the data import and export paths and solutions for various scenarios in OceanBase Database.

OceanBase Database supports the following data transfer solutions:

  • Data import into or export from from OceanBase Database
  • Primary/Standby synchronization in OceanBase Database
  • Data migration and synchronization to OceanBase Database
  • Data transfer from OceanBase Database to an incremental parsing system
  • Data transfer from OceanBase Database to a message queue

In these scenarios, an OceanBase database can either serve as the primary database for data reads and writes or as the standby database for data synchronization. It can also serve as the source or target for data migration.

Data import and export

You can import data into or export data from OceanBase Database in the following ways:

  • Using SQL statements

    • To export data, use the SELECT INTO OUTFILE statement.
    • To import data, use the LOAD DATA INFILE statement.
  • Using tools

    • To export data, you can use obdumper. It allows you to export object definitions and table data from OceanBase Database in a specific file format to storage media.
    • To import data, you can use obloader.

You can use obloader or the LOAD DATA statement to import data files of different sizes in standard formats such as CSV, INSERT SQL, ORC, or Parquet into OceanBase Database. Choose the method that best suits your needs for data import/export.

Primary/Standby synchronization

OceanBase Database V4.x provides the Physical Standby Database solution at the tenant level. This solution consists of the following components:

  1. A primary tenant, which provides read and write services.
  2. One or more standby tenants, which synchronize data changes in the primary tenant in real time through redo logs.

Please note that the Physical Standby Database solution of OceanBase Database supports only the asynchronous synchronization mode.

In OceanBase Database V4.x, you can choose between the following two deployment methods for the Physical Standby Database solution:

  1. Archive-based deployment
  2. Network-based deployment

The two deployment modes differ in the data synchronization method. You can select a deployment mode as needed. The synchronization performance of the two deployment modes is described as follows:

  • The performance of both deployment modes is subject to multiple factors, such as the database load, storage device performance, and network bandwidth.
  • The network-based deployment mode allows synchronization within seconds.
  • The archive-based deployment mode increases the synchronization latency to minutes.

The Physical Standby Database solution applies to the following scenarios:

  • The primary and standby tenants are homogeneous and support physical replication.
  • The primary and standby tenants support zone- and geo-disaster recovery, as well as read-write splitting.

Archive-based deployment

In the archive-based deployment mode, redo logs are sourced from the archive logs of the primary tenant or a standby tenant. A standby tenant only synchronizes logs from the source through archive logs, without communicating with the primary tenant or other standby tenants.

Network-based deployment

In the network-based deployment mode, a standby tenant directly connects to the primary tenant or another standby tenant over the network to read logs in real time. The network connection between the primary and standby tenants must be smooth to ensure that the standby tenant can constantly request logs from the log transfer service of the primary tenant. The logs can be sourced from the online logs or archive logs (if log archiving is enabled) of the primary tenant. The system can automatically switch between the two log sources, which is imperceptible to the standby tenant and users.

Data migration and synchronization

OMS

OceanBase Migration Service (OMS) is a tool provided by OceanBase Database for data migration and synchronization. You can use OMS for data interaction between homogeneous or heterogeneous data sources and OceanBase Database. OMS supports online migration of existing data and real-time synchronization of incremental data. The data migration feature of OMS applies to business scenarios such as database upgrade, cross-instance data migration, database splitting, and database scaling.

OMS can synchronize incremental data from OceanBase Database and other databases to the message queues of self-managed instances, such as Kafka and RocketMQ instances, in real time. The data synchronization feature of OMS applies to business scenarios such as cloud business intelligence analysis, real-time data warehouse construction, data query, report distribution, active geo-redundancy, remote disaster recovery, and data aggregation.

CDC

OceanBase Database provides the binlog service to implement Change Data Capture (CDC). With this service, you can directly use Canal or Debezium for CDC when you switch from MySQL Database to OceanBase Database's MySQL mode. Designed for scenarios such as real-time data subscription, the binlog service collects transaction logs of OceanBase Database and converts them into MySQL binlogs.

Comparison of migration solutions

Comparison item OceanBase Database MySQL Database Oracle Database
Data import and export
  • LOAD DATA/OUTFILE
  • obloader and obdumper
  • DBLink
  • External table (supported since V4.3.1)
LOAD DATA/OUTFILE
  • SQL Loader
  • Load Data Dump
  • External table
  • Database Link
Primary/Standby synchronization
  • Based on archive logs
  • Based on online logs
Based on binlog master-slave
  • Based on redo logs
  • Oracle Data Guard
  • Oracle Active Data Guard (reads supported in a standby database)
Data migration and synchronization OMS/Binlog service Replication to ecosystem tools such as Canal Oracle GoldenGate

Previous topic

Best practices for read-write splitting
Last

Next topic

Overview on data migration
Next
What is on this page
Data import and export
Primary/Standby synchronization
Archive-based deployment
Network-based deployment
Data migration and synchronization
OMS
CDC
Comparison of migration solutions