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

Databases

OceanBase DatabaseOceanBase Cloud OceanBase 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 Service

Connectors and Middleware

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

Databases

OceanBase DatabaseOceanBase Cloud OceanBase 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 Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Loader and Dumper

V4.3.6
  • Document Overview
  • Introduction
  • Technical Mechanism
  • Preparations
    • Prepare the environment
    • Prepare data
    • Download OBLOADER & OBDUMPER
    • Startup parameters
  • User Guide (OBLOADER)
    • Quick start
    • Command-line options
    • Multi-database import
    • Direct load
    • Data processing
      • Define a control file
      • Preprocessing functions
      • Case expressions
    • Use cases of command-line options
    • Performance tuning
    • Error handling
    • FAQ
  • User Guide (OBDUMPER)
    • Quick start
    • Command-line options
    • Multi-database export
    • Data processing
      • Define a control file
      • Preprocessing functions
      • Case expressions
    • Performance tuning
    • FAQ
  • Security Features
  • Connection configuration
  • Self-service Troubleshooting
  • Release Note
    • Release Note
      • 4.x
        • OBLOADER & OBDUMPER V4.3.6
        • OBLOADER & OBDUMPER V4.3.5
        • OBLOADER & OBDUMPER V4.3.4.1
        • OBLOADER & OBDUMPER V4.3.4
        • OBLOADER & OBDUMPER V4.3.3.1
        • OBLOADER & OBDUMPER V4.3.3
        • OBLOADER & OBDUMPER V4.3.2.1
        • OBLOADER & OBDUMPER V4.3.2
        • OBLOADER & OBDUMPER V4.3.1.1
        • OBLOADER & OBDUMPER V4.3.1
        • OBLOADER & OBDUMPER V4.3.0
        • OBLOADER & OBDUMPER V4.2.8.2
        • OBLOADER & OBDUMPER V4.2.8.1
        • OBLOADER & OBDUMPER V4.2.8
        • OBLOADER & OBDUMPER V4.2.7
        • OBLOADER & OBDUMPER V4.2.6
        • OBLOADER & OBDUMPER V4.2.5
        • OBLOADER & OBDUMPER V4.2.4
        • OBLOADER & OBDUMPER V4.2.1
        • OBLOADER & OBDUMPER V4.1.0
        • OBLOADER & OBDUMPER V4.0.0
      • 3.x
        • OBLOADER \& OBDUMPER V3.1.0
        • OBLOADER \& OBDUMPER V3.0.0
    • Versioning rules

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Loader and Dumper
  3. V4.3.6

Prepare the environment

Last Updated:2026-09-04 08:19:58

Runtime environment
Configure HDFS dependencies
Runtime permissions
OBLOADER runtime permissions
OBDUMPER privileges
Additional information

Before running the data import/export tools, ensure you have a suitable runtime environment and permissions.

Runtime environment

Environment
Requirements
System Version Supported operating systems: Linux, macOS, and Windows 7 and later.
Java Environment Install Oracle JDK 1.8.0_3xx, configureJAVA_HOMEEnvironment variables.
Character set We recommend that you use the UTF-8 file encoding.
JVM parameters Please editbin/obloaderandbin/obdumperscripts to modify JVM memory parameters and avoid insufficient JVM memory.

Note

Some minor versions of OpenJDK 1.8 have severe garbage collector (GC) errors, which may cause out-of-memory exceptions or program freezes when running the import/export tools. To avoid these issues, we recommend installing the latest minor version of OpenJDK 1.8.

If you are using a domestic operating system such as Kylin, you need to change the GC collector in the JVM parameters (i.e., JAVA_OPTS) from G1 to CMS; otherwise, the JVM may crash.

If you are using OBLOADER/OBDUMPER versions earlier than V4.3.0, edit the bin/obloader or bin/obdumper file and change the GC parameter from -XX:+UseG1GC to -XX:+UseConcMarkSweepGC.

If you are using OBLOADER/OBDUMPER V4.3.0 or later, edit the bin/obloader or bin/obdumper file and modify the GC_OPTS parameter to -XX:+UseG1GC or -XX:+UseConcMarkSweepGC. For example, GC_OPTS="-XX:+UseG1GC".

Configure HDFS dependencies

Data import/export tools V4.3.0 and later depend on Hadoop components. When using OBLOADER/OBDUMPER on Windows, you must configure the HDFS dependency first; otherwise, an error HADOOP_HOME and hadoop.home.dir are unset. will occur.

  1. Go to the Code page and click Code > Download ZIP in the upper-right corner to download the zip package.
  1. After extracting it, copy the current directory path.

    This article uses the directory path C:\User\chang\winutils as an example. Please replace it with your actual path in the following steps.

  2. You can configure it in one of the following two ways. Choose the method that suits your needs.

    • Set the system environment variable directly: HADOOP_HOME = C:\User\chang\winutils\hadoop-3.3.6, and append %HADOOP_HOME%\bin to the user variable Path.

    • Use Notepad to open <tool_root_directory>\bin\windows\obdumper.bat and find the following line:

      SET PROGRAM_OPTS=%PROGRAM_OPTS% "-Dtool.base.dir=%PARENT_PATH%"
      

      Add a new line above or below this line with the following command, save, and exit.

      SET PROGRAM_OPTS=%PROGRAM_OPTS% "-Dhadoop.home.dir=C:\User\chang\winutils\hadoop-3.3.6"
      
  3. Run OBLOADER/OBDUMPER again.

Runtime permissions

OBLOADER runtime permissions

When using OBLOADER to connect to an OceanBase database for data import, the account used to connect to the database must have execution permissions for commands such as CREATE, SELECT, INSERT, and UPDATE. You can view the privileges granted to a user using the SHOW GRANTS statement. Example statement:

obclient> SHOW GRANTS FOR user1;
+------------------------------------------+
| Grants for user1@%                       |
+------------------------------------------+
| GRANT CREATE ON *.* TO 'user1'           |
| GRANT SELECT ON `db1`.* TO 'user1'       |
| GRANT INSERT ON `db1`.* TO 'user1'       |
| GRANT UPDATE ON `db1`.* TO 'user1'       |
| GRANT SELECT ON `oceanbase`.* TO 'user1' |
+------------------------------------------+
2 rows in set

Note

  • If you are using the MySQL-compatible mode of OceanBase Database, you must have the query privilege on the oceanbase database before you import data. Example: GRANT SELECT ON `oceanbase`.* TO 'user1'.

    If you are using the Oracle-compatible mode of OceanBase Database, you must have the query privilege on the SYS database before you import data. Example: GRANT SELECT ON "SYS".* TO 'user1'.

  • We recommend that you use an account with the DBA role to connect to OceanBase Database in Oracle compatible mode when you use OBLOADER to import database object definitions and data.

OBDUMPER privileges

When you use OBDUMPER to connect to OceanBase Database for data export, the account used to connect to the database must have the privileges to execute commands such as CREATE and SELECT. You can run the SHOW GRANTS statement to view the privileges granted to a user. Example:

obclient> SHOW GRANTS FOR user1;
+------------------------------------------+
| Grants for user1@%                       |
+------------------------------------------+
| GRANT CREATE ON *.* TO 'user1'           |
| GRANT SELECT ON `db1`.* TO 'user1'       |
| GRANT SELECT ON `oceanbase`.* TO 'user1' |
+------------------------------------------+
2 rows in set

Note

  • OBDUMPER requires privileges on system tables only when exporting non-table database objects.
    • If you are using the MySQL-compatible mode of OceanBase Database, you must have the query privilege on the oceanbase database before you export data. Example: GRANT SELECT ON `oceanbase`.* TO 'user1'.

    • If you are using the Oracle-compatible mode of OceanBase Database, you must have the query privilege on the SYS database before you export data. Example: GRANT SELECT ON "SYS".* TO 'user1'.

  • We recommend that you use an account with the DBA role to connect to OceanBase Database in Oracle compatible mode when you use OBDUMPER to export database object definitions. No role is required for the account used to connect to the database when you use OBDUMPER to export data.

Additional information

  • For OceanBase Database versions earlier than V4.0.0, you must specify the --sys-user and --sys-password options on the command line of the data import/export tools.

    For more information, see OBLOADER command-line options and OBDUMPER command-line options.

  • The --sys-user and --sys-password options require a user under the sys tenant that has the privilege to query system tables and views.

  • For more information about privileges, see View user privileges, Overview of users and privileges, and Modify user privileges.

Previous topic

Technical Mechanism
Last

Next topic

Prepare data
Next
on this page
Runtime environment
Configure HDFS dependencies
Runtime permissions
OBLOADER runtime permissions
OBDUMPER privileges
Additional information