OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Service

V3.4.0Enterprise Edition
  • OMS Documentation
  • What's new
  • OMS Introduction
    • What is OMS?
    • Terms
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • Limits
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deployment Guide
    • Deployment type
    • System and network requirements
    • Memory and disk requirements
    • Prepare the environment
    • Deploy OMS on a single node
    • Deploy OMS on multiple nodes in a single region
    • Deploy OMS on multiple nodes in multiple regions
    • Scale-out and deployment
    • Check the deployment
    • Deploy a time-series database (Optional)
  • OMS console
    • Log on to the OMS console
    • Overview
    • User center
      • Configure user information
      • Change your logon password
      • Log off
  • Data migration
    • Data migration overview
    • Create a project to migrate data from a MySQL database to a MySQL tenant of OceanBase Database
    • Create a project to migrate data from a MySQL tenant of OceanBase Database to a MySQL database
    • Create a project to migrate data from an Oracle database to a MySQL tenant of OceanBase Database
    • Create a project to migrate data from an Oracle tenant of OceanBase Database to an Oracle database
    • Create a project to migrate data from an Oracle database to an Oracle tenant of OceanBase Database
    • Create a project to migrate data from a DB2 LUW database to an Oracle tenant of OceanBase Database
    • Create a project to migrate data from an Oracle tenant of OceanBase Database to a DB2 LUW database
    • Create a project to migrate data from a DB2 LUW database to an OceanBase database in MySQL tenant mode
    • Create a project to migrate data from a MySQL tenant of OceanBase Database to a DB2 LUW database
    • Migrate data within OceanBase Database
    • Create an active-active disaster recovery project in OceanBase Database
    • Create a project to migrate data from a TiDB database to an OceanBase database in MySQL tenant mode
    • Create a project to migrate data from a PostgreSQL database to a MySQL tenant of OceanBase Database
    • Manage data migration projects
      • View details of a data migration project
      • View and modify migration objects
      • Use tags to manage data migration projects
      • Download and import the settings of migration objects
      • Start, pause, and resume a data migration project
      • Release and delete a data migration project
    • Features
      • DML filtering
      • Synchronize DDL operations
      • Configure matching rules for migration objects
      • Wildcard rules
      • Rename a database table
      • Use SQL conditions to filter data
      • Create and update a heartbeat table
      • Schema migration mechanisms
      • Schema migration operations
    • Supported DDL operations in incremental migration and limits
      • Supported DDL operations in incremental migration from a MySQL database to a MySQL tenant of OceanBase Database and limits
      • Supported DDL operations in incremental migration from a MySQL tenant of OceanBase Database to a MySQL database and limits
      • Supported DDL operations in incremental migration from an Oracle database to an Oracle tenant of OceanBase Database
      • Supported DDL operations in incremental migration from an Oracle tenant of OceanBase Database to an Oracle database
      • Dynamic DDL operations during data migration between an Oracle tenant of OceanBase Database and a DB2 LUW database
      • Supported DDL operations in incremental migration from a DB2 LUW database to a MySQL tenant of OceanBase Database and limits
      • Supported DDL operations in incremental migration from a MySQL tenant of OceanBase Database to a DB2 LUW database and limits
      • Supported DDL operations in incremental migration between MySQL tenants of OceanBase Database
      • Supported DDL operations in incremental migration between Oracle tenants of OceanBase Database
  • Data synchronization
    • Data synchronization overview
    • Create a project to synchronize data from an OceanBase database to a Kafka instance
    • Create a project to synchronize data from an OceanBase database to a RocketMQ instance
    • Create a project to synchronize data from an OceanBase database to a DataHub instance
    • Create a project to synchronize data from a DBP logical table to a physical table in the MySQL tenant of OceanBase Database
    • Create a project to synchronize data from a DBP logical table to a DataHub instance
    • Create a project to synchronize data from an IDB logical table to the MySQL tenant of OceanBase Database
    • Create a project to synchronize data from an IDB logical table to a DataHub instance
    • Create a project to synchronize data from a MySQL database to a DataHub instance
    • Create a project to synchronize data from an Oracle database to a DataHub instance
    • Manage data synchronization projects
      • View details of a data synchronization project
      • View and modify synchronization objects
      • Use tags to manage data synchronization projects
      • Download and import the settings of synchronization objects
      • Start, pause, and resume a data synchronization project
      • Release and delete a data synchronization project
    • Features
      • DML filtering
      • Synchronize DDL operations
      • Rename databases and tables
      • Rename a topic
      • Use SQL conditions to filter data
      • Column filtering
      • Data formats
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase data source
        • Create a physical OceanBase data source
        • Create a DBP data source
        • Create an IDB data source
      • Create a MySQL data source
      • Create an Oracle data source
      • Create a TiDB data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a DataHub data source
      • Create a DB2 LUW data source
      • Create a PostgreSQL data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
    • Minimum privileges required when an Oracle database serves as the source
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Update quotas
      • View server logs
    • Components
      • Store
        • Create a store
        • View details of a store
        • Update the configurations of a store
        • Start and pause a store
        • Destroy a store
      • Connector
        • View details of a connector
        • Start and pause a connector
        • Migrate a connector
        • Update the configurations of a connector
        • Batch O\&M
        • Delete a connector
      • JDBCWriter
        • View details of a JDBCWriter
        • Start and pause a JDBCWriter
        • Migrate a JDBCWriter
        • Update the configurations of a JDBCWriter
        • Batch O\&M
        • Delete a JDBCWriter
      • Checker
        • View the information about a checker
        • Start and pause a checker
        • Rerun and reverify a checker
        • Update the configurations of a checker
        • Delete a checker
    • O&M tickets
      • View details of an O\&M ticket
      • Skip a ticket or sub-ticket
      • Retry a ticket or sub-ticket
  • System management
    • User management
    • Alert center
      • View project alerts
      • View system alerts
      • Manage alert settings
    • Associate with OCP
    • System parameters
      • Modify system parameters
      • Modify HA configurations
    • Operation audit
  • O&M Guide
    • Manage OMS services
    • OMS logs
    • O&M operations for the Store component
    • Store parameters
      • Parameters of an Oracle store
      • Parameters of a DB2 store
      • Parameters of a MySQL store
      • Parameters of an OceanBase store
    • O&M operations for the Supervisor component
    • Parameters of the Supervisor component
    • O&M operations for the Connector component
    • Connector parameters
      • Parameters of a destination RocketMQ instance
      • Parameters of a DataflowSink instance
      • Parameters in the destination Kafka instance
      • Parameters of the source database in full migration
      • Parameters of the source database in incremental data synchronization
      • Parameters of a destination DataHub instance
      • Parameters of the source Sybase database
      • Parameters for intermediate-layer synchronization
    • Checker parameters
    • JDBCWriter parameters
    • Parameters of the CM component
  • Reference Guide
    • API Reference
      • Obtain the status of a migration project
      • Obtain the status of a synchronization project
    • OMS error codes
    • Alert Reference
      • oms_host_down
      • oms_host_down_migrate_resource
      • oms_host_threshold
      • oms_migration_failed
      • oms_migration_delay
      • oms_sync_failed
      • oms_sync_status_inconsistent
      • oms_sync_delay
  • Upgrade Guide
    • Overview
    • Upgrade OMS in single-node deployment mode
    • Upgrade OMS in multi-node deployment mode
    • FAQ
  • FAQ
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • How do I troubleshoot the OMS server down issue?
    • Project diagnostics
      • How do I troubleshoot common problems with Oracle Store?
      • How do I perform performance tuning for Oracle Store?
      • What do I do when Oracle Store reports an error at the isUpdatePK stack?
      • What do I do when a store does not have data of the timestamp requested by the downstream?
      • What do I do when OceanBase Store failed to access an OceanBase cluster through RPC?
      • How do I use LogMiner to pull data from an Oracle database?
    • OPS & monitoring
      • What are the alert rules?
    • Data synchronization
      • FAQ about synchronization to a message queue
        • What are the strategies for ensuring the message order in incremental data synchronization to Kafka
    • Data migration
      • User privileges
        • What privileges do I need to grant to a user during data migration to or from an Oracle database?
      • Full migration
        • FAQ about full migration
          • How do I query the ID of a checker?
          • How do I query log files of the Checker component of OMS?
          • How do I query the verification result files of the Checker component of OMS?
          • What do I do if the destination table does not exist?
      • Incremental synchronization
        • How do I skip DDL statements?
        • How do I update the configurations of a JDBCWriter?
        • How do I start or stop a JDBCWriter?
        • How do I update whitelists and blacklists?
        • What are the application scope and limits of ETL?
    • Installation and deployment
      • How do I upgrade Store?
  • Release Note
    • V3.4
      • OMS V3.4.0
    • V3.3
      • OMS V3.3.1
      • OMS V3.3.0
    • V3.2
      • OMS V3.2.2
      • OMS V3.2.1
    • V3.1
      • OMS V3.1.0
    • V2.1
      • OMS V2.1.2
      • OMS V2.1.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Service
  3. V3.4.0

What privileges do I need to grant to a user during data migration to or from an Oracle database?

Last Updated:2026-09-04 08:13:47

Privileges required for DBA users in Oracle databases earlier than 12c
Privileges required for non-DBA users in Oracle databases earlier than 12c
Privileges required for DBA users in Oracle Database 12c and later versions
For a non-PDB database
For a PDB
Privileges required for non-DBA users in Oracle Database 12c and later versions
For a non-PDB database
For a PDB

This topic describes how to grant privileges to migration users when you migrate data to or from an Oracle database.

Consider the following factors when you grant privileges to a user:

  • Whether the Oracle database version is earlier than 12C

  • Whether to grant the DBA role to the user

  • Whether the Oracle database is a pluggable database (PDB)

Privileges required for DBA users in Oracle databases earlier than 12c

If the environment allows you to assign the database administrator (DBA) role to the migration user and the Oracle database version is earlier than 12c, execute the following statement to grant the DBA privileges to the migration user:

GRANT DBA TO <user_name>;

Privileges required for non-DBA users in Oracle databases earlier than 12c

If the environment allows you to grant only the required privileges to the migration user and the Oracle database version is earlier than 12c, perform the following operations:

  1. Grant the CONNECT privilege.

    GRANT CONNECT TO <user_name>;
    
  2. Grant the CREATE SESSION, ALTER SESSION, SELECT ANY TRANSACTION, SELECT ANY TABLE, and SELECT ANY DICTIONARY privileges to the migration user.

    GRANT
        CREATE SESSION,
        ALTER SESSION,
        SELECT ANY TRANSACTION,
        SELECT ANY TABLE,
        SELECT ANY DICTIONARY
    TO <user_name>;
    
  3. Grant the LOGMINER privilege to the migration user.

    GRANT EXECUTE ON SYS.DBMS_LOGMNR TO <user_name>;
    
  4. Grant the CREATE TABLE and UNLIMITED TABLESPACE privileges to the migration user.

    GRANT CREATE TABLE, UNLIMITED TABLESPACE TO <user_name>;
    
  5. Check whether the name of the schema to be migrated is consistent with the value of user_name.

    1. If they are consistent, execute the following statement:

      GRANT CREATE SEQUENCE,CREATE VIEW TO <user_name>;
      
    2. If they are inconsistent, you can grant the user all privileges on all schemas:

      GRANT
          CREATE ANY TABLE,
          CREATE ANY INDEX,
          DROP ANY TABLE,
          ALTER ANY TABLE,
          COMMENT ANY TABLE,
          DROP ANY INDEX,
          ALTER ANY INDEX,
          CREATE ANY SEQUENCE,
          ALTER ANY SEQUENCE,
          DROP ANY SEQUENCE,
          CREATE ANY VIEW,
          DROP ANY VIEW,
          INSERT ANY TABLE,
          DELETE ANY TABLE,
          UPDATE ANY TABLE
      TO <user_name>;
      
    3. If they are inconsistent and you want to grant the user only the INSERT, UPDATE, and DELETE privileges on the databases and tables to be migrated, execute the following statement:

      GRANT
          CREATE ANY TABLE,
          CREATE ANY INDEX,
          DROP ANY TABLE,
          ALTER ANY TABLE,
          COMMENT ANY TABLE,
          DROP ANY INDEX,
          ALTER ANY INDEX,
          CREATE ANY SEQUENCE,
          ALTER ANY SEQUENCE,
          DROP ANY SEQUENCE,
          CREATE ANY VIEW,
          DROP ANY VIEW
      TO <user_name>;
      # Execute the following statement for each database and table involved in the migration:
      GRANT INSERT, UPDATE, DELETE ON <database name>.<table name> TO <user_name>;
      

Privileges required for DBA users in Oracle Database 12c and later versions

If the environment allows you to assign the DBA role to the migration user and the version of the Oracle database is 12c or later, determine whether a PDB is used.

For a non-PDB database

  1. Grant the DBA role to the migration user:

    GRANT DBA TO <user_name>;
    
  2. Grant the read privilege on the SYS.USER$ view to the migration user:

    GRANT SELECT ON SYS.USER$ TO <user_name>;
    

For a PDB

If you are to migrate data from a PDB of Oracle Database 12c, 18c, or 19c to an Oracle tenant of OceanBase Database, a common user account is required for pulling data from the PDB.

  1. Execute the following statement to switch to the CDB$ROOT container: All common users can connect to the root container named CDB$ROOT and any accessible PDB and then perform related operations.

    ALTER SESSION SET CONTAINER=CDB$ROOT;
    
  2. Grant the DBA role to the migration user:

    GRANT DBA TO <C##XXX> CONTAINER=ALL;
    
  3. Grant the read privilege on the SYS.USER$ view to the migration user:

    GRANT SELECT ON SYS.USER$ TO <C##XXX> CONTAINER=ALL;
    

Privileges required for non-DBA users in Oracle Database 12c and later versions

If the environment allows you to grant only the required privileges to the migration user and the version of the Oracle database is 12c or later, perform the following operations:

For a non-PDB database

  1. Grant the CONNECT privilege to the migration user:

    GRANT CONNECT TO <user_name>;
    
  2. Grant the read privilege on the SYS.USER$ view to the migration user:

    GRANT SELECT ON SYS.USER$ TO <user_name>;
    
  3. Grant the CREATE SESSION, ALTER SESSION, SELECT ANY TRANSACTION, SELECT ANY TABLE, and SELECT ANY DICTIONARY privileges to the migration user:

    GRANT
        CREATE SESSION,
        ALTER SESSION,
        SELECT ANY TRANSACTION,
        SELECT ANY TABLE,
        SELECT ANY DICTIONARY
    TO <user_name>;
    
  4. Grant the LOGMINER privilege to the migration user.

    GRANT LOGMINING TO <user_name>;
    GRANT EXECUTE ON SYS.DBMS_LOGMNR TO <user_name>;
    
  5. Grant the CREATE TABLE and UNLIMITED TABLESPACE privileges to the migration user.

    GRANT CREATE TABLE, UNLIMITED TABLESPACE TO <user_name>;
    
  6. Check whether the name of the schema to be migrated is consistent with the value of user_name.

    1. If they are consistent, execute the following statement:

      GRANT CREATE SEQUENCE,CREATE VIEW TO <user_name>;
      
    2. If they are inconsistent, execute the following statement:

      GRANT
          CREATE ANY TABLE,
          CREATE ANY INDEX,
          DROP ANY TABLE,
          ALTER ANY TABLE,
          COMMENT ANY TABLE,
          DROP ANY INDEX,
          ALTER ANY INDEX,
          CREATE ANY SEQUENCE,
          ALTER ANY SEQUENCE,
          DROP ANY SEQUENCE,
          CREATE ANY VIEW,
          DROP ANY VIEW,
          INSERT ANY TABLE,
          DELETE ANY TABLE,
          UPDATE ANY TABLE
      TO <user_name>;
      

For a PDB

If you migrate data from a PDB of Oracle Database 12c, 18c, or 19c to an Oracle tenant of OceanBase Database, a common user account is required for pulling data from the PDB.

  1. Grant the CONNECT privilege to the migration user:

    GRANT CONNECT TO <C##XXX> CONTAINER=ALL;
    
  2. Grant the read privilege on the SYS.USER$ view to the migration user:

    GRANT SELECT ON SYS.USER$ TO <C##XXX> CONTAINER=ALL;
    
  3. Grant the CREATE SESSION, ALTER SESSION, SELECT ANY TRANSACTION, SELECT ANY TABLE, and SELECT ANY DICTIONARY privileges to the migration user:

    GRANT
        CREATE SESSION,
        ALTER SESSION,
        SELECT ANY TRANSACTION,
        SELECT ANY TABLE,
        SELECT ANY DICTIONARY
    TO <C##XXX> CONTAINER=ALL;
    
  4. Grant the LOGMINER privilege to the migration user:

    GRANT LOGMINING TO <C##XXX> CONTAINER=ALL;
    GRANT EXECUTE ON SYS.DBMS_LOGMNR TO <C##XXX> CONTAINER=ALL;
    
  5. Grant the CREATE TABLE and UNLIMITED TABLESPACE privileges to the migration user:

    GRANT CREATE TABLE, UNLIMITED TABLESPACE TO <C##XXX> CONTAINER=ALL;
    
  6. Check whether the name of the schema to be migrated is consistent with the value of C##XXX.

    1. If they are consistent, execute the following statement:

      GRANT CREATE SEQUENCE, CREATE VIEW TO <C##XXX> CONTAINER=ALL;
      
    2. If they are inconsistent, execute the following statement:

      GRANT
          CREATE ANY TABLE,
          CREATE ANY INDEX,
          DROP ANY TABLE,
          ALTER ANY TABLE,
          COMMENT ANY TABLE,
          DROP ANY INDEX,
          ALTER ANY INDEX,
          CREATE ANY SEQUENCE,
          ALTER ANY SEQUENCE,
          DROP ANY SEQUENCE,
          CREATE ANY VIEW,
          DROP ANY VIEW,
          INSERT ANY TABLE,
          DELETE ANY TABLE,
          PDATE ANY TABLE
      TO <C##XXX> CONTAINER=ALL;
      

Previous topic

What are the strategies for ensuring the message order in incremental data synchronization to Kafka
Last

Next topic

How do I query the ID of a checker?
Next
on this page
Privileges required for DBA users in Oracle databases earlier than 12c
Privileges required for non-DBA users in Oracle databases earlier than 12c
Privileges required for DBA users in Oracle Database 12c and later versions
For a non-PDB database
For a PDB
Privileges required for non-DBA users in Oracle Database 12c and later versions
For a non-PDB database
For a PDB