Before you run OBLOADER & OBDUMPER, make sure that you have the appropriate operating environment and privileges.
Operating environment configurations
| Configuration item | Requirements |
|---|---|
| OS | Linux, macOS, and Windows 7 or later |
| Java environment | Install Oracle JDK 1.8, and configure the JAVA_HOME environment variable. We do not recommend that you use OpenJDK. |
| Character set | We recommend that you use UTF-8 as the file character set. |
| Java virtual machine (JVM) parameters | Modify the JVM memory parameter in the bin/obloader and bin/obdumper scripts to avoid JVM memory insufficiency. |
Note
Due to serious garbage collection (GC) bugs in some versions of OpenJDK 1.8, an out of memory (OOM) error or a hang will occur when OBLOADER & OBDUMPER is running. Therefore, install the latest minor version of OpenJDK 1.8.
Privileges
OBLOADER
When you connect OBLOADER to OceanBase Database and use this tool to import data, you must have the following privileges:
The user account that you use to connect to OceanBase Database must have the privileges to execute the
SELECT,INSERT,MERGE, andUPDATEstatements. You can view the privileges granted to a user by using theSHOW GRANTSstatement. Example:obclient> SHOW GRANTS FOR user1; +----------------------------------------+ | Grants for user1@% | +----------------------------------------+ | GRANT SELECT ON *.* TO 'user1' | | GRANT INSERT ON `db1`.* TO 'user1' | | GRANT MERGE ON `db1`.* TO 'user1' | | GRANT UPDATE ON `db1`.* TO 'user1' | | GRANT VIEW ON `db1`.* TO 'user1' | +----------------------------------------+ 2 rows in setNote
For more information, see View user privileges, Users and privileges, and Modify user privileges.In versions earlier than OceanBase Database V4.0.0.0, you need to specify the
--sys-userand--sys-passwordoptions on the command line of OBLOADER & OBDUMPER. For more information, see Scenarios and examples in the OBLOADER section.Notice
The--sys-userand--sys-passwordoptions must be set to the username and password of a user with system table and view query privileges under the sys tenant.
OBDUMPER
When you connect OBDUMPER to OceanBase Database and use this tool to export data, you must have the following privileges:
The user account that you use to connect to OceanBase Database must have the privileges to execute the
SELECTandSETstatements. You can view the privileges granted to a user by using theSHOW GRANTSstatement. Example:obclient> SHOW GRANTS FOR user1; +----------------------------------------+ | Grants for user1@% | +----------------------------------------+ | GRANT SELECT ON *.* TO 'user1' | | GRANT SET ON `db1`.* TO 'user1' | | GRANT VIEW ON `db1`.* TO 'user1' | +----------------------------------------+ 2 rows in setNote
For more information, see View user privileges, Users and privileges, Modify user privileges, and SET.In versions earlier than OceanBase Database V4.0.0.0, you need to specify the
--sys-userand--sys-passwordoptions on the command line of OBLOADER & OBDUMPER. For more information, see Scenarios and examples in the OBDUMPER section.Notice
The--sys-userand--sys-passwordoptions must be set to the username and password of a user with system table and view query privileges under the sys tenant.