Prepare the environment

2024-02-27 08:55:15  Updated

Before you run OBLOADER & OBDUMPER, make sure that you have the appropriate operating environment and privileges.

Operating environment

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 recommend that you use JDK 1.8.0_3xx or later.
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

Some minor versions of OpenJDK 1.8 have serious garbage collection (GC) bugs. OBLOADER & OBDUMPER may encounter out of memory (OOM) errors or hang. Therefore, you need to install the latest minor version of OpenJDK 1.8.

Privileges

OBLOADER

When you use OBLOADER to import data to an OceanBase database, the account used to connect to the database must have the privileges to execute the CREATE, SELECT, INSERT, and UPDATE statements. You can view the privileges granted to a user by using the SHOW GRANTS statement. Here is an example:

obclient> SHOW GRANTS FOR user1;
+------------------------------------------+
| Grants for user1@%                       |
+------------------------------------------+
| GRANT CREATE ON *.* TO 'user1'           |
| GRANT SELECT ON `db1`.* TO 'user1'       |
| GRANT INSERT ON `db1`.* TO 'user1'       |
| GRANT UPDATE ON `db1`.* TO 'user1'       |
| GRANT SELECT ON `oceanbase`.* TO 'user1' |
+------------------------------------------+
2 rows in set

Note

  • The account must also have the SELECT privilege on the oceanbase database.
  • To use OBLOADER to import database object definitions and data to an Oracle tenant of OceanBase Database, we recommend that you connect to the database by using the account of a database administrator (DBA).

OBDUMPER

When you use OBDUMPER to export data from an OceanBase database, the account used to connect to the database must have the privileges to execute the CREATE and SELECT statements. You can view the privileges granted to a user by using the SHOW GRANTS statement. Here is an example:

obclient> SHOW GRANTS FOR user1;
+------------------------------------------+
| Grants for user1@%                       |
+------------------------------------------+
| GRANT CREATE ON *.* TO 'user1'           |
| GRANT SELECT ON `db1`.* TO 'user1'       |
| GRANT SELECT ON `oceanbase`.* TO 'user1' |
+------------------------------------------+
2 rows in set

Note

  • The account must also have the SELECT privilege on the oceanbase database.
  • To use OBDUMPER to export database object definitions from an Oracle tenant of OceanBase Database, we recommend that you connect to the database by using the account of a DBA. When you use OBDUMPER to export data from an Oracle tenant of OceanBase Database, no special requirement is imposed on the account used to connect to the database.

Other considerations

Contact Us