OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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 Loader and Dumper

V3.0.0Community Edition

  • Document Overview
  • OBLOADER
    • Overview
    • User Guide
      • Environment preparation
      • Run OBLOADER
      • Command-line options
      • Data processing
        • Define control files
        • Preprocessing functions
        • Conditional expressions
      • Performance tuning
      • Scenarios
    • FAQ
  • OBDUMPER
    • Overview
    • User Guide
      • Environmental Preparation
      • Run OBDUMPER
      • Command-line options
      • Data
        • Define control files
        • Preprocessing functions
        • Conditional expressions
      • Performance tuning
      • Scenarios
    • FAQ

Download PDF

Document OverviewOverview Environment preparation Run OBLOADER Command-line options Performance tuning Scenarios FAQ Overview Environmental Preparation Run OBDUMPER Command-line options Performance tuning Scenarios FAQ
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & CertificationTicket
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 Loader and Dumper
  3. V3.0.0
iconOceanBase Loader and Dumper
V 3.0.0Community Edition
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
  • V 4.3.6
  • V 4.3.5
  • V 4.3.4.1
  • V 4.3.4
  • V 4.3.3.1
  • V 4.3.3
  • V 4.3.2.1
  • V 4.3.2
  • V 4.3.1
  • V 4.2.8
  • V 4.2.7
  • V 4.2.6
  • V 4.2.5 and earlier
Community Edition
  • V 4.2.5
  • V 4.2.4
  • V 4.1.0
  • V 4.0.0
  • V 3.0.0
Enterprise Edition
  • V 4.2.5
  • V 4.2.4

Command-line options

Last Updated:2026-04-13 07:40:24  Updated
Share
What is on this page
Sample command
Options

folded

Share

OBLOADER allows you to import required data by specifying command-line options.

Sample command

The following code provides an example on how to import data. For more information, see the following Options table and the Scenarios topic.

If you connect OBLOADER to an OceanBase cluster through OceanBase DataBase Proxy (OBProxy), use the -h and -P options to specify the IP address and port number of the OBProxy host. Then, use the -c option to specify the name of the cluster to be connected to. If you directly connect OBLOADER to an OBServer, you do not need to use the -c option to specify the name of the cluster to be connected to.

[admin@localhost]>./obloader  -h <host IP address> -P <port number> -u <username> -p <password>  --sys-password <password of a user under the sys tenant> -c <cluster> -t <tenant name> -D <--database> [--ddl] [--csv|--sql] [--all|--table 'table name'] -f<data file or directory>

Options

Option
Required
Description
-h (--host) Yes The IP address of the OBProxy or OBServer to be connected to.
-P (--port) Yes The port number of the OBProxy or OBServer to be connected to.
-c (--cluster) No The cluster name of the cluster. You do not need to specify this option if OBDUMPER is directly connected to an OBServer.
-t (--tenant) No The tenant name of the user.
-u (--user) Yes The username that you use to log on to the database.
-p (--password) No The password that you use to log on to the database.
-D (--database) No The name of the database.
-f (--file-path) Yes The directory that stores the data file or the absolute path of the data file.
--sys-user No The username of a user under the sys tenant. Default value: root@sys.
--sys-password No The password of the user specified by the --sys-user option. By default, this option is left empty.
--public-cloud No Uses the limited mode to import data. You do not need to specify the --sys-user option in limited mode.
--file-suffix No The extension of the data file. Do not confuse a file extension and a file format. You can use regular expressions.
--file-encoding No The file encoding format. Default value: UTF-8.
--ctl-path No The directory where the control file is stored. The extension of the control file is updated to .ctrl from .ctl.
--map-path No The directory where the file that stores data field mappings is stored.
--log-path No The directory to which log files are exported.
--ddl No Imports files in the DDL format. Default file name extension: -schema.sql.
--sql No Imports files in the SQL format. Default file name extension: .sql.
--mix No Imports files that contain both schemas and data.
--csv No Imports CSV files. We recommend that you use this option. Default file name extension: .csv.
--pos No Imports files in the POS format. In these files, data is organized based on the byte offsets of a fixed length.
--cut No Imports files in the CUT format in which data is separated by several characters. Different from data in the CSV format, data in the CUT format is separated by strings.
--all No Imports the definitions of all database objects.
--table No The table to be exported. Separate multiple tables with commas (,). If you set this option to an asterisk (*), all tables in the database specified by the -D option are imported.
--view No The view to be imported. Separate multiple views with commas (,). If you set this option to an asterisk (*), all views in the database specified by the -D option are imported.
--replace-object No Replaces a table schema if the table schema already exists. We recommend that you do not use this option.
--rw No The ratio between the read threads and write threads. Default value: 0.2, which is 1 read thread to 5 write threads.
--slow No The memory usage threshold of the OBServer, exceeding which OBLOADER will slow down. Default value: 0.75.
--pause No The memory usage threshold of the OBServer, exceeding which OBLOADER will pause. Default value: 0.85.
--batch No The number of queries supported in a single transaction. Default value: 200.
--thread No The number of worker threads. Default value: CPU × 2.
--block-size No The size of a file block, in MB. Default value: 64.
--retry No Specifies whether to resume the import from the last saved point after the import is interrupted.
--external-data No Records data if it is exported by using a third-party tool. OBLOADER does not check the meta information about data exported by third-party tools.
--max-tps No The upper limit of the import speed in the unit of rows/second. Default value: Integer.MAX_VALUE.
--max-wait-timeout No The maximum amount of time OBLOADER waits for a major compaction to finish before it times out, in hours. Default value: 3.
--trail-delimiter No Deletes the last column delimiter if the data ends with column delimiters.
--with-trim No Truncates leading and trailing spaces of the data.
--skip-header No Specifies whether to skip the first row in a CSV file. By default, the first row is not skipped.
--null-string No The string to replace NULL. Default value: \N. If the value is not \N after the data is imported, the original value is a NULL string.
--empty-string No The escape character for an empty string (' '). Default value: \E.
--line-separator No The row delimiter. Default value: '\n'.
--column-separator No The column delimiter. Default value: ','.
--escape-character No The escape character. Default value: '\'.
--column-delimiter No The quotation marks. Default value: ' '.
--exclude-table No * If you specify a table name, the schema and data of the specified table are not exported. Example: --exclude-table 'a,b,c'. * If you do not specify a table, all table schemas and data are exported. Example: --exclude-table ''. * You can use asterisks (*) for fuzzy matching. For example, you can specify --exclude-table '*ab*' to exclude tables whose names contain ab.
--column-splitter No The column delimiter. Different from the CSV format where the delimiter is a single character, this option allows you to use a string, which can have several characters, to separate data.
--oss-endpoint No The endpoint of the region where a bucket resides. For example, for the China (Hangzhou) region, the value must be https://oss-cn-hangzhou.aliyuncs.com.
--access-key No The account used to access the Object Storage Service (OSS) bucket.
--secret-key No The secret key used to access the OSS bucket.
--bucket-uri No The URI of the bucket. URI format: oss://bucket/key1/key2 Example: oss:// oceanbasepublic/tools/obdumper.
--max-discards No Limits the number of discards generated by a single table. This option applies to a single object. For example, when you import Table A and Table B, if the discards generated by Table A reach the specified value of the max-discards option, OBLOADER stops the import of Table A and continues to import Table B. * --max-discards=0: OBLOADER sends an alert and stops the import once a discard is generated. * --max-discards=N: The N represents a positive integer. OBLOADER sends an alert and stops the import when N discards are generated. * --max-discards=-1: OBLOADER ignores the alert and continues the import.
--max-errors No The maximum number of errors that can be ignored. You can ignore all errors. By default, at most 10 errors can be ignored. If more than 10 errors occur for a thread, the program exits. This option applies to a single object. For example, when you import Table A and Table B, if the errors generated by Table A reach the specified value of the max-errors option, OBLOADER stops the import of Table A and continues to import Table B. * --max-errors=0: OBLOADER reports an error and stops the import once an error is generated. * --max-errors=N: The N represents a positive integer. OBLOADER reports an error and stops the import when N errors occur. * --max-errors=-1: OBLOADER ignores the errors and continues the import. Notice However, some errors cannot be ignored and must be eliminated before you can continue the import. For more information about errors that cannot be ignored, see FAQ about OBLOADERSymbol with texture.
--replace-data No Supports the import of incremental data, and allows you to overwrite and insert data when a primary key or unique key conflict occurs. You can import files in the --sql, --csv, or --cut format. The --sql format is preferred.
--truncate-table No Specifies whether to clear tables before the import. We recommend that you do not use this option. Instead, we recommend that you manually clear tables. When an application starts, an error may be reported to indicate that the partition information cannot be found.

Previous topic

Run OBLOADER
Last

Next topic

Define control files
Next
What is on this page
Sample command
Options