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 Developer Center

V4.2.3
  • Overview
    • What is ODC?
    • Features
    • Architecture
    • Limitations
    • ODC console
  • Quick Start
    • Client ODC
      • Overview
      • Install Client ODC
      • Use Client ODC
    • Web ODC
      • Overview
      • Deploy Web ODC
      • Use Web ODC
  • Data Source Management
    • Create a data source
    • Data sources and project collaboration
    • Database O&M
      • Session management
      • Global variable management
      • Recycle bin management
  • SQL Development
    • Write and execute SQL statements
    • Perform PL compilation and debugging
    • Use the command-line window
    • Edit and export the result set of an SQL statement
    • Analyze SQL statements
    • Generate test data
    • Database objects
      • Table objects
        • Overview
        • Create a table
        • Table list
        • Manage table attributes
        • Manage table data
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
  • Import and Export
    • Import schemas and data
    • Export schemas and data
  • Database Change Management
    • User Permission Management
      • Users and roles
      • Automatic authorization
    • Project collaboration management
    • Risk levels, risk identification rules, and approval processes
    • SQL check specifications
    • SQL window specification
    • Database change management
    • Lock-free schema changes
    • Synchronize shadow tables
  • Data Lifecycle Management
    • Archive data
    • Clean up data
    • Manage partitions
    • SQL plan task
  • Data Desensitization and Auditing
    • Desensitize data
    • Operation records
  • System Integration
    • SSO integration
    • Approval integration
    • SQL approval integration
  • Deployment Guide
    • Deployment overview
    • Preparations before deployment
    • Deploy a single ODC node
      • Deployment process
      • Load and run an ODC image
    • Deploy ODC in high availability mode
      • Deployment process
      • Load and run an ODC image
      • Deploy SSL certificate
      • Deploy the NGINX proxy
      • Configure certificate trust
    • Deployment verification
  • Upgrade Guide
    • Overview
    • Preparations before upgrade
    • Upgrade single-node ODC
      • Upgrade process
      • Stop ODC of the earlier version
      • Load and run an ODC image
    • Upgrade high-availability
      • Upgrade process
      • Stop ODC of the earlier version
      • Load and run an ODC image
      • Upgrade NGINX image
    • Upgrade verification
    • Rollback after upgrade failed
  • Troubleshooting
    • ODC troubleshooting process
    • Collect Message
      • View the runtime environment and version information
      • View web ODC logs
      • View client ODC logs
      • View end-to-end ODC-related logs
      • View ODC MetaDB data
      • Query the index status in OceanBase Database V4.x
      • Query the index status in OceanBase Database V1.4.x to V3.2.x
      • Collect JVM runtime information
      • Use tcpdump to capture packets
    • Common Troubleshooting
      • Deployment Upgrade
        • Web ODC cannot be accessed after startup
      • Database Connection
        • Access denied in a connection trial or test
        • Connection is refused in a connection trial or test
        • Connection times out
        • `Connection reset` is reported for a time-consuming statement
        • `socket write error` or `closed by server` is reported for a connection
      • SQL Execution
        • Disconnection during SQL execution
        • `Over tenant memory limits` is reported during SQL execution
        • `Unknown thread id` is returned during SQL execution
        • `timeout` errors returned during SQL execution
        • `OutOfMemoryError` is returned during SQL execution
        • Incomplete result columns for the SELECT statement
        • Garbled Chinese characters in the SQL execution result set
        • Garbled Chinese data is returned for query of data in GBK encoding
      • PL Object
        • Debugging is not supported for invalid PL objects
        • `JSONException` is reported during PL debugging
        • Garbled variable values in debugging
        • Failed to view PL objects or garbled characters are returned
        • PL objects cannot be executed or an execution error is returned
        • ODC issues during PL debugging
        • PL anonymous block cannot be debugged
        • Alert information of a PL object is unavailable
      • Import and Export
        • Garbled Chinese characters in an imported file in GBK encoding
        • Invalid ZIP package reported during file import
        • Time-type data exported from an Oracle tenant cannot be imported
        • Mismatched columns reported during the import of a single-table CSV file
        • Failed to export a result set in ODC to an Excel file
        • Incorrect display in Excel for a result set exported in CSV format
        • Incomplete data in batch export of multiple tables
        • `javax.crypto.BadPaddingException: Given final block not properly padded` is returned for a data import or export failure
      • Client ODC Problems
        • Client ODC startup failure / H2 Database corruption: Chuck not found
        • Garbled Chinese characters in the command-line window of ODC
        • Failed to install client ODC
        • Client ODC startup failure or no response
        • `Not a valid secret key` is returned for connection creation in client ODC
        • `User does not exist` returned for connection creation in client ODC
        • High memory usage of client ODC
        • Client ODC fails to be installed or start due to a port conflict
      • Front-end Page Exception
        • JavaScript exception is thrown on the ODC page
        • No response in browser after opening ODC
        • White screen in ODC
      • Account Password Problem
        • Forgot the admin account password in ODC V3.2.0 or later
        • Forgot an account password in ODC V2.4.1 to V3.1.3
        • Forgot an account password in ODC V2.4.0 or earlier
    • FAQ
      • Installation of client ODC
      • Web ODC deployment and startup
      • FAQ
      • Command-line window
      • DDL statement display
  • Release Note
    • V4.2
      • ODC V4.2.3
      • ODC V4.2.2
      • ODC V4.2.0
      • ODC V4.2.1
    • V4.1
      • ODC V4.1.2
      • ODC V4.1.1
      • ODC V4.1.0
    • V4.0
      • ODC V4.0.2
      • ODC V4.0.0
    • V3.4
      • ODC V3.4.0
    • V3.3
      • ODC V3.3.3
      • ODC V3.3.2
      • ODC V3.3.1
      • ODC V3.3.0
    • V3.2
      • ODC V3.2.3
      • ODC V3.2.2
      • ODC V3.2.1
      • ODC V3.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Developer Center
  3. V4.2.3

Export schemas and data

Last Updated:2026-10-09 03:24:30

Background information
Export format
Considerations
Create an export task
Export schemas and data from an OceanBase database
Export schemas and data from a MySQL database
View an export task
Task list
Task information
Task process
Task logs
Export the generated file
References

Background information

OceanBase Developer Center (ODC) allows you to export the schemas and data of database objects in batches.

You can create an export task to export both the schemas and data, only the data, or only the schemas of database objects.

  • Export schemas and data: Definition statements and data of database objects are exported.

  • Export data only: Only data of table or view objects is exported.

  • Export only schemas: Only definition statements of database objects are exported.

Export format

ODC exports data in a .zip file, which contains the metadata file MANIFEST.bin, the schema definition files of the exported objects, and the data files.

When you create an export task, if you set Data Format to SQL Format, the .zip file contains schema definition files named in the format of object name-schema.sql and data files named in the format of object name.sql. The object names are the same as those in the database.

Image 445

If you set Data Format to CSV Format, the .zip file contains schema definition files named in the format of object name-schema.sql and data files named in the format of object name.csv. The object names are the same as those in the database.

Image 444

Considerations

  • The maximum size of data exported in one batch in ODC cannot exceed 2 GB before compression. To export data of a larger size, use the data export tool OBDUMPER.

  • At most five concurrent export tasks are supported. Subsequent tasks need to wait in the queue.

  • By default, files related to export tasks are retained for 14 days.

  • In ODC of a version later than V4.1.0, you can configure a sys tenant account for an OceanBase data source to increase the export speed. When you export objects other than tables and views, a sys tenant account is no longer a must.

Create an export task

Export schemas and data from an OceanBase database

Example: Export the schemas and data of the employee and student tables in the odc_test database to your local disk in batches.

Parameter
Example value
Data source mysql410
Database name odc_test
Table name employee and student
  1. On the Ticket tab, choose Data Export > Create New.

    2

  2. In the Export panel, specify Export Content.

    3

  3. Select the database.

    Select the database where the objects to export reside. The name of the data source for the database to which the task belongs is also displayed.

    Notice

    In MySQL mode of OceanBase Database, export is not supported for a built-in database.

  4. Select the export scope.

    You can select Partial Export or Full Export.

    • If you select Partial Export, you can select the objects you want to export in the Select Objects pane in the Export Objects section. You can use the search box to search for desired objects.

    • If you select Full Export, all objects in the database are exported.

      Note

      In ODC V4.2.2 and later, you can export type objects.

  5. Go to the Export Settings panel.

    Click Next: Export Settings to specify the file export settings and the sys tenant account.

  6. Configure data file settings.

    4

    Note

    If you have selected Export Schema Only for Export Content, you do not need to configure data file settings.

    Parameter
    Description
    Data Format ODC supports exporting data to files in the CSV format and SQL format. If you have selected Export Schema Only for Export Content, you can export data only to files in the SQL format.
    File Encoding ODC supports the following encoding standards: ASCII, ISO-8859-1, GB2312, GBK, GB18030, Unicode (UTF-8), Unicode (UTF-16), Unicode (UTF-32), and BIG5.
    Maximum Size of a Single File If you have selected Export Schema Only for Export Content, you do not need to set the maximum size of a single file.
    You can set the maximum size of a single file. When the size of a file exceeds the specified value, it is automatically split. If you set this parameter to Unlimited, files will not be split.
    CSV Settings If you have selected CSV Format for Data Format and Export Schema and Data for Export Content, you can set the following parameters:
    • Include the Column Header: specifies whether to include column headers when data is exported in the CSV format. This option is selected by default.
    • Convert the Empty String into a Null Value: specifies whether to convert empty strings in the table to NULL values when data is exported in the CSV format. This option is selected by default.
    • Field Separator: specifies the separator between fields. The following signs are supported: commas (,), semicolons (;), and colons (:). You can also use a character as the separator.
    • Text Identifier: specifies the identifier for the text content. Single quotation marks (') and double quotation marks (") are supported.
    • Line Break Symbol: specifies the line break symbol. The following characters are supported: \n, \r, and \r\n.
    Batch Commit Quantity This parameter specifies the number of rows exported that triggers the database to perform an autocommit when the data is exported as a file in the SQL format. In other words, a COMMIT command is added to the exported file each time when the specified amount of data is exported.
    Use Global Snapshot If you select this option, ODC exports the data in the latest global snapshot of the specified table to ensure global data consistency.
  7. Configure schema file settings.

    • If you have selected Export Schema Only for Export Content, you can select Merge Exported Results into an SQL File. After you select this option, DDL statements are merged and exported as one SQL file.

    • Choose whether to select Add DROP TABLE Statement before CREATE TABLE Statement. If you select this option, a DROP statement is added before the corresponding CREATE statement of an object when the schema files of the object are exported.

  8. Select the task execution mode.

    Select Execute Now or Scheduled Execution.

  9. Complete the settings in the sys Tenant Settings section.

    a. Choose whether to select the Use sys Tenant Account to Accelerate Import Task option. If you select this option, you must also specify Account and Password.

    b. Click Test Connection next to the password field to verify whether the account information is correct. By default, the account for the connection settings is automatically filled in. If the connection fails, we recommend that you change the password for this export.

    Notice

    • The account and password of the sys tenant are the account and password of a user in a cluster tenant. Do not enter @sys#cluster in the Account field. For example, you can set the account to odc and password to *******.
    • If no account of the sys tenant is specified, the import/export will be slow.
  10. Choose whether to retain the current settings.

    You can select Retain Current Configuration in the lower-right corner to save the current data file and schema file settings.

  11. Generate an export task.

    After you specify all preceding information, you can click Export in the lower-right corner of the panel to create an export task.

Export schemas and data from a MySQL database

Note

In ODC V4.2.3 and later, you can export schemas and data from a MySQL database.

Example: Export the schemas and data of the employee and student tables of the odc_test database to your local disk in batches.

Parameter
Example value
Data source mysql8
Database name odc_mysql
Table name employee and student
  1. On the Ticket tab, choose Data Export > Create New.

    2

  2. In the Export panel, specify Export Content.

    5mysql

  3. Select the database.

    Select the database where the objects to export reside. The name of the data source for the database to which the task belongs is also displayed.

    Notice

    In MySQL mode of OceanBase Database, export is not supported for a built-in database.

  4. Select the export scope.

    You can select Partial Export or Full Export.

    • If you select Partial Export, you can select the objects you want to export in the Select Objects pane in the Export Objects section. You can use the search box to search for desired objects.

    • If you select Full Export, all objects in the database are exported.

      Note

      In ODC V4.2.2 and later, you can export type objects.

  5. Go to the Export Settings panel.

    Click Next: Export Settings to specify the file export settings and the sys tenant account.

  6. Configure data file settings.

    6mysql

    Note

    If you have selected Export Schema Only for Export Content, you do not need to configure data file settings.

    Parameter
    Description
    Data Format ODC supports exporting data to files in the CSV format and SQL format. If you have selected Export Schema Only for Export Content, you can export data only to files in the SQL format.
    File Encoding ODC supports the following encoding standards: ASCII, ISO-8859-1, GB2312, GBK, GB18030, Unicode (UTF-8), Unicode (UTF-16), Unicode (UTF-32), and BIG5.
    CSV Settings If you have selected CSV Format for Data Format and Export Schema and Data for Export Content, you can set the following parameters:
    • Include the Column Header: specifies whether to include column headers when data is exported in the CSV format. This option is selected by default.
    • Convert the Empty String into a Null Value: specifies whether to convert empty strings in the table to NULL values when data is exported in the CSV format. This option is selected by default.
    • Field Separator: specifies the separator between fields. The following signs are supported: commas (,), semicolons (;), and colons (:). You can also use a character as the separator.
    • Text Identifier: specifies the identifier for the text content. Single quotation marks (') and double quotation marks (") are supported.
    • Line Break Symbol: specifies the line break symbol. The following characters are supported: \n, \r, and \r\n.
    Batch Commit Quantity This parameter specifies the number of rows exported that triggers the database to perform an autocommit when the data is exported as a file in the SQL format. In other words, a COMMIT command is added to the exported file each time when the specified amount of data is exported.
  7. Configure schema file settings.

    • If you have selected Export Schema Only for Export Content, you can select Merge Exported Results into an SQL File. After you select this option, DDL statements are merged and exported as one SQL file.

    • Choose whether to select Add DROP TABLE Statement before CREATE TABLE Statement. If you select this option, a DROP statement is added before the corresponding CREATE statement of an object when the schema files of the object are exported.

  8. Select the task execution mode.

    Select Execute Now or Scheduled Execution.

  9. Choose whether to retain the current settings.

    You can select Retain Current Configuration in the lower-right corner to save the current data file and schema file settings.

  10. Generate an export task.

    After you specify all preceding information, you can click Export in the lower-right corner of the panel to create an export task.

View an export task

Task list

Note

  • The task list displays tasks of the last 48 hours.
  • At most three concurrent export tasks are supported. Subsequent tasks need to wait in the queue.

After an export task is generated, the Ticket tab automatically appears. You can view the approval status and basic information of the task in the task list, and download the exported data and schema files.

7

The following table describes the columns in the export task list.

Parameter
Description
No. The ID of the export task.
Type The type of the task specified when you created the task.
Ticket Description The description entered when the task was initiated.
Current Reviewer The approver. You can click the Search icon to search for or filter tasks by a specific reviewer.
Created By The user who created the export task. You can click the search icon to search for or filter tasks by a specific creator.
Created At The date and time when the task was generated.
Status The current status of the task. ODC provides different management actions for tasks in different states.
Actions Click View to go to the Task Details panel to view the task information and task logs.

Task information

  1. In the export task list shown in the preceding figure, click View in the Actions column of an export task to view information about the task.

  2. In the Task Details panel of the task, click the Task Information tab to view the basic task information, file export information, and object information.

    8

    Item
    Description
    Basic task information The execution status, ID, database, type, risk level, execution method, creator, and creation time of the task are displayed.
    File export information The export content, data format, file encoding standard, data export settings, schema export settings, error handling method, and sys tenant account specified when the export task was created are displayed.
    Object information The information about the export objects is displayed in the following columns: Object Name, Object Type, Schema Processing Status, Actual Processing Quantity, and Data Processing Status.

Task process

In the Task Details panel of the target task, click the Task Process tab to view the initiation, approval, and execution information of the task.

9

Task logs

In the Task Details panel of the target task, click the Task Logs tab to view all logs and alert logs of the task.

Parameter
Description
All Logs Displays the complete information of all task logs, including INFO, ERROR, and WARN logs.
Alert Logs Displays the ERROR and WARN logs of the task. When a task fails, you can view the error message in the alert logs.

In addition, the toolbar provides the following icons:

Icon
Description
Search Click this icon to search for logs.
Download Click this icon to download logs.
Copy Click this icon to copy logs.

10

Export the generated file

In the Task Details panel of the target task, click Download in the lower-right corner to export the generated file to your local disk.

References

  • Import schemas and data

Previous topic

Import schemas and data
Last

Next topic

Users and roles
Next
on this page
Background information
Export format
Considerations
Create an export task
Export schemas and data from an OceanBase database
Export schemas and data from a MySQL database
View an export task
Task list
Task information
Task process
Task logs
Export the generated file
References