OBLOADER & OBDUMPER supports various command-line parameters to adapt to different business scenarios and provides a series of default startup parameters to control the default behavior of OBLOADER & OBDUMPER when no explicit parameters are specified. These default parameters are automatically loaded when OBLOADER & OBDUMPER starts, ensuring general usability while providing reasonable runtime settings to enhance convenience and consistency. You can override or adjust these parameters based on your needs to meet the configuration requirements of particular scenarios.
Executable file parameter modification method
After you download and decompress the OBLOADER & OBDUMPER package, all executable files are saved in the ${install_dir}/bin directory. To customize the startup parameters, use a text editor to modify the executable file in the bin directory. Different operating systems require different files to be modified:
Linux:
${install_dir}/bin/OBLOADERWindows:
${install_dir}/bin/windows/OBLOADER.bat
For example, to enable the parallel write feature by setting the enable.parallel.write startup parameter to true, perform the following steps:
Use vim to open the
${install_dir}/bin/OBLOADERfile.Find the
enable.parallel.writeoption.PROGRAM_OPTS="${PROGRAM_OPTS} -Denable.parallel.write=false";Change
falsetotrueto enable the parallel write feature.PROGRAM_OPTS="${PROGRAM_OPTS} -Denable.parallel.write=true";
JDBC parameter modification method
For versions earlier than V4.2.6, only a limited number of session variables and JDBC parameters are supported. You can modify the existing configurations in the
<tool root directory>/conf/session.propertiesfile.For V4.2.6 and later, the configuration file has been changed to
<tool root directory>/conf/session.config.jsonto provide a more flexible configuration method. As long as the SQL statements are supported by OBServer or the URL parameters are supported by JDBC, you can add, delete, or modify the existing connection parameters as needed. For more information, see Connection configuration.
How to modify JDBC parameters
For versions earlier than V4.2.6, only a limited number of session variables and JDBC parameters are supported. You can modify the existing parameters in the configuration file at
<tool-root-directory>/conf/session.properties.For V4.2.6 and later, the configuration file has been changed to
<tool-root-directory>/conf/session.config.jsonto provide more flexible configuration options. You can add, delete, or modify existing connection parameters without limits, as long as they are supported by OBServer SQL statements or JDBC URL parameters. For more information, see Connection configuration.
Startup parameters of an executable file
| Parameter | Description | Scenarios | Default value |
|---|---|---|---|
| enable.partition.calculation | Specifies whether to enable partition calculation during import. | OBLOADER | true |
| enable.definer | Specifies whether to include definer information when exporting the definitions of stored procedures and functions. | OBDUMPER | true |
| enable.table.index | Specifies whether to include index information when exporting the table definitions in the Oracle compatible mode of OceanBase Database. | OBDUMPER | true |
| enable.table.comment | Specifies whether to include table comment information when exporting the table definitions in the Oracle compatible mode of OceanBase Database. | OBDUMPER | true |
| enable.table.column.comment | Specifies whether to include column comment information when exporting the table definitions in the Oracle compatible mode of OceanBase Database. | OBDUMPER | true |
| sqlMonitor.enabled=true | Specifies whether to enable the SQL monitor log, which generates the sql-monitor.log file. |
OBLOADER/OBDUMPER | true |
| sqlMonitor.slowSql.threshold | Specifies the time threshold for determining whether an SQL statement is a slow query, in milliseconds. | OBLOADER/OBDUMPER | 3000 |
| enable.parallel.write | Specifies whether to enable parallel write. If you enable this option, multiple files are concurrently generated for a subtask, which improves the overall performance. | OBDUMPER | false |
| skip.tableName.check | Specifies whether to check the file name when exporting data. If you export a table name that contains a dot (.), you cannot extract the actual table name from the file name during import. | OBDUMPER | false |
| upload.buffer.type | Specifies the type of the buffer for data transfer to cloud storage. Valid values: Amazon S3, Alibaba OSS, and other object storage services. The value of upload.buffer.type can be disk or bytebuffer.
|
OBDUMPER | disk |
| upload.buffer.size | Specifies the buffer size for a block, in bytes. | OBDUMPER | 67108864 |
| upload.active.blocks | Specifies the maximum number of blocks (by table or subtask) that a single writer can handle at the same time. This parameter takes effect only when enable.parallel.write is true. |
OBDUMPER | 2 |
| upload.disable.chunked.encoding | Specifies whether to disable chunked encoding for all requests in the S3 client configuration.
NoticeWe recommend that you use this option only when chunked upload is not used at the endpoint to reduce the impact on performance. |
OBDUMPER | false |
| dry.run | Specifies whether to run OBLOADER & OBDUMPER in test mode without performing actual import or export operations. | OBLOADER/OBDUMPER | false |
| rebalance.import | Specifies whether to run OBLOADER & OBDUMPER in test mode to rebalance the data distribution in the buffer. | OBLOADER | false |
| loadThread.startup.minIntervalMillis | Specifies the startup interval for import threads, in milliseconds. | OBLOADER | 1000 |
| dataSource.maxActive | Specifies the maximum number of active connections in the connection pool. The existing connection pool has n connections. | OBLOADER/OBDUMPER | 2 * n |