Q: How do I solve an out-of-memory (OOM) error when I use OBLOADER to import data?
A: First, modify the memory parameter for the Java Virtual Machine (JVM) in the obloader script stored in the bin/ directory. Then, check whether an OpenJDK garbage collection (GC) bug occurs.
Q: How do I run OBLOADER in debugging mode for troubleshooting?
A: You can directly run the obloader-debug script stored in the bin/ directory.
Q: How do I use OBLOADER to import a data file whose name is different from that of the table?
A: Set the command-line option -f to the absolute path of the data file, for example, --table 'test' -f '/output/hello.csv'.
Q: Why does the control file configured for a table fail to take effect when I import data to the table?
A: The name of the control file must be identical to the table name. By default, table names are in lowercase in MySQL compatible mode and in uppercase in Oracle compatible mode.
Q: Why are command-line options not parsed as expected when I run the OBLOADER script?
A: This issue may occur if command-line option values contain special characters. For example, if you run OBLOADER in Linux, a greater-than sign (>) in the password may cause the loss of all runtime logs. The greater-than sign (>) is a redirection operator. Therefore, you must use appropriate quotation marks to resolve this issue on different OS platforms. For more information, see the next question.
Q: When do I need to enclose options in single quotation marks (' ') or double quotation marks (" ") when I run the OBLOADER script?
A: We recommend that you use quotation marks to enclose option values in the string format.
In Windows, use double quotation marks (" "), for example,
--table "*".In a Linux-like OS, use single quotation marks (' '), for example,
--table '*'.
Q: What should I do when the external file format does not meet the requirements?
A: OBLOADER has the following format requirements for an external file to be imported:
An SQL file can contain only INSERT statements but not comments or SET statements. Each INSERT statement occupies one line without line breaks. If the file contains DDL or DML statements, we recommend that you run the MySQL source command to import it.
A CSV file must meet the specifications of the standard. The file must be configured with an escape character, delimiter, column separator, and row separator. If data in the file contains any delimiter, the escape character must be specified.
Q: How do I customize log file names for an import job?
A: You can customize log file names in the log4j2.xml file stored in the {ob-loader-dumper}/conf/ directory. As shown in the following figure, you can modify the following names under the Routing tag:

ob-loader-dumper.infofor INFO logs underInfoRoutingAppenderob-loader-dumper.warnfor WARN logs underWarnRoutingAppenderob-loader-dumper.errorfor ERROR logs underErrorRoutingAppender
Note
If you change ob-loader-dumper.info, ob-loader-dumper.warn, and ob-loader-dumper.error to the same name, all logs are generated in the same file.
Q: What do I do when no response is returned during log output in the console?
A: This issue may occur if log output is suspended or terminated in the console. Perform the following steps to troubleshoot this issue:
Open the log configuration file
log4j2.xmlstored in the{ob-loader-dumper}/conf/directory and find the following configurations:<Logger name="com.oceanbase.tools.loaddump" additivity="false" level="INFO"> <AppenderRef ref="ConsoleAppender"/> <AppenderRef ref="InfoRoutingAppender"/> <AppenderRef ref="WarnRoutingAppender"/> <AppenderRef ref="ErrorRoutingAppender"/> </Logger>Delete
<AppenderRef ref="ConsoleAppender"/>and try again.
Q: What do I do if the following error is reported when I start OBLOADER: Access denied for user 'root'@'xxx.xxx.xxx.xxx'?
A: By default, OBLOADER requires the privileges of the root@sys user. If a password has been specified in the cluster for the root@sys user, set the value of the --sys-password option to the specified password.
Q: What do I do if one of the following errors is reported when OBLOADER is running: Over tenant memory limits and No memory or reach tenant memory limit?
A: Increase the memory space for the global SQL workarea or reduce the concurrency specified by --thread.
set global ob_sql_work_area_percentage=30; -- Default 5
Q: What do I do if OBLOADER returns the Bad Record error when I import CSV files and the data contains line breaks?
A: OBLOADER may have used the UNSAFE mode to split the file by default. You need to modify the JVM environment variables in the script. Open the obloader file in the {ob-loader-dumper}/bin/ directory, find the keyword PROG_OPTS, and change -Dfile.split=UNSAFE to -Dfile.split=SAFE.
Q: What do I do if OBLOADER returns the following error during running: No tables are exists in the schema: "xxx"?
A: The table names specified in the --table 't1,t2' option must be identical to those defined in the database. By default, table names are in lowercase in MySQL compatible mode of OceanBase Database, and in uppercase in Oracle compatible mode of OceanBase Database. To specify a lowercase table name in Oracle compatible mode, you must enclose the table name in brackets ([ ]). For example, --table '[t1]' indicates a table named t1.
Q: What do I do if the following error is reported when OBLOADER is running: The xxx files are not found in the path: "xxx"?
A: The name of the data file in the directory specified by the -f option must be identical to the table name. By default, table names are in lowercase in MySQL compatible mode of OceanBase Database, and in uppercase in Oracle compatible mode of OceanBase Database. For example, the data file in --table 't1' must be t1.csv or t1.sql, instead of T1.csv or any other file names.
Q: What do I do if the following error is reported when OBLOADER is running: The manifest file: "xxx" is missing?
A:MANIFEST.bin is a metadata file that is generated when you export data by using OBDUMPER. If you use other tools to export data, no metadata file is generated. You can specify the --external-data option to skip the check of metadata files.
Q: What do I do if the following error is reported when I use OBLOADER to import a delimited text file: Index: 0, Size: 0?
A: This error occurs if the data file contains carriage returns or line breaks. You must run a script to delete the carriage returns or line breaks from the data file before you import it.
Q: What do I do if the error socket was closed by server is reported on OBLOADER and an OOM error is returned for OceanBase Database Proxy (ODP) when I import data of a KEY-partitioned table to OceanBase Database in MySQL compatible mode by using ODP (Sharding)?
A: Set the proxy_mem_limited parameter and check if there are any external dependencies. By default, ODP has a memory limit of 2 GB. When importing data to a logical MySQL database of OceanBase Database using OBLOADER, you must use the root@proxysys account. The statement to modify the memory limit for the logical database is as follows:
ALTER proxyconfig SET proxy_mem_limited = xxg
Q: What do I do when OBLOADER returns the error Not supported feature or function?
A: Some features are not supported for OceanBase Database of earlier versions. When you use OceanBase Database V2.2 or earlier, set the JDBC parameter useServerPrepStmt to false in the configuration file session.config.json stored in the {ob-loader-dumper}/conf/ directory, and delete the set session sql_mode = xxx statement under the init_sql.mysql tag of the configuration file.