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 bin/obloader script. Then, rule out the OpenJDK garbage collection (GC) bug.
Q: How do I run OBLOADER in debugging mode for troubleshooting?
A: You can directly run the bin/obloader-debug script.
Q: How do I use OBLOADER to import a data file whose name is different from the table?
A: Set the command-line option -f to the absolute path of the data file. 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 mode and in uppercase in Oracle 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 or OBDUMPER on Linux OS, a greater-than sign (>) in the password may cause the loss of all operational logs. This is because 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 enclose option values in the string format in quotation marks.
- On the Windows OS, use double quotation marks (" "). Example:
--table "*". - On a Linux-like OS, use single quotation marks (' '). Example:
--table '*'.
Q: What do I do if external files fail to be imported due to invalid file formats?
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: 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 and OBDUMPER require the privileges of the root@sys user. If you have set a password for the root@sys user in the cluster, specify the password in the --sys-password option in the command.
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 ratio 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 the following error is reported when OBLOADER is 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 mode and in uppercase in Oracle mode. To specify a lowercase table name in Oracle mode, you must enclose the table name in brackets ([ ]). Example: --table '[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 mode and in uppercase in Oracle mode. For example, if you specify --table 't1', the data file in the directory must be named t1 in a supported format, such as t1.csv or t1.sql. Other file names such as T1.csv are invalid.
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 feeds. 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 mode by using ODP (Sharding)?
A: Set the privilege of the proxy_mem_limited parameter and check for external dependencies. The default memory limit for ODP is 2 GB. When you import data by using ODP (Sharding) and OBLOADER, you must use the root@proxysys account. Use the following statement to modify the memory limit of the logical database:
ALTER proxyconfig SET proxy_mem_limited = xxg