OceanBase
English日本語简体中文
ドキュメントホーム
製品
エコシステム
リリース

データベース

OceanBase CloudOceanBaseデータベース

ツール

OceanBase Cloud PlatformOceanBase移行サービス(OMS)OceanBaseデベロッパーセンターOceanBase Admin Tool

データベース

OceanBase CloudOceanBaseデータベース

ツール

OceanBase Cloud PlatformOceanBase移行サービス(OMS)OceanBaseデベロッパーセンターOceanBase Admin Tool
OceanBase CloudOceanBaseデータベース

OceanBase移行サービス(OMS)

V4.3.3Enterprise Edition
  • OMSドキュメント
  • OMSの概要
    • OMSの概要
    • 用語解説
    • OMS高可用性(HA)の紹介
    • Storeの原理
    • Full-Import/Incr-Syncデータ転送の原理
    • データ検証の原理について
    • システムアーキテクチャ
      • アーキテクチャ概要
      • 機能アーキテクチャ
      • コンポーネントの基本原理
    • OMS Oracle 全量移行の設計原理と影響
    • 制限事項
  • クイックスタート
    • データ移行プロセス
    • データ同期プロセス
  • OMSのデプロイ
    • デプロイメントタイプ
    • システムとネットワーク要件
    • メモリとディスク要件
    • 環境の準備
    • シングルノードデプロイ
    • 単一リージョン・マルチノード構成
    • 複数リージョン・複数ノードへのデプロイ
    • スケールアウトデプロイメント
    • スケールインのデプロイ
    • デプロイ状態の確認
    • (オプション)時系列データベースのデプロイ
  • 管理コンソール
    • OMSコンソールへのログイン
    • マネジメントコンソールの紹介
    • 個人設定
      • 個人情報の設定
      • ログインパスワードの変更
      • ログアウト
  • データ移行
    • データ移行の概要
    • MySQLデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのMySQL互換モードのデータをMySQLデータベースに移行する
    • OracleデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのOracle互換モードのデータをOracleデータベースに移行する
    • OracleデータベースのデータをOceanBaseデータベースのOracle互換モードに移行する
    • DB2 LUWデータベースのデータをOceanBaseデータベースのOracle互換モードに移行する
    • OceanBaseデータベースのOracle互換モードのデータをDB2 LUWデータベースに移行する
    • DB2 LUWデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのMySQL互換モードのデータをDB2 LUWデータベースに移行する
    • OceanBaseデータベース間のデータ移行
    • 双方向同期タスクの設定
    • TiDBデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • PostgreSQLデータベースのデータをOceanBaseデータベースのOracle互換モードに移行する
    • PostgreSQLデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • PolarDB-X 1.0データベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • MilvusデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OBShardingデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのOracle互換モードからMySQLデータベースへの増分データ移行
    • データ移行タスクの管理
      • データ移行タスクの詳細を表示する
      • データ移行タスクの名前を変更する
      • 移行対象オブジェクトの表示と変更
      • タグを使用したデータ移行タスクの管理
      • データ移行タスクの一括操作
      • 移行対象オブジェクト設定のダウンロードとインポート
      • 移行パラメータ設定の確認と変更
      • 競合ログファイルのダウンロード
      • データ移行タスクの開始と一時停止
      • データ移行タスクの終了と削除
    • DDL同期のサポート範囲と制限事項
      • MySQLデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
        • MySQLデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期の概要
        • テーブルの作成 CREATE TABLE
          • テーブルの作成
          • 列の作成
          • インデックスまたは制約の作成
          • パーティションの作成
        • データ型の変換
        • テーブルの変更 ALTER TABLE
          • テーブルの変更
          • フィールド操作
          • 制約とインデックスの操作
          • パーティション操作
        • テーブルの全行削除 TRUNCATE TABLE
        • テーブルの名前変更 RENAME TABLE
        • テーブルの削除 DROP TABLE
        • インデックスの作成 CREATE INDEX
        • インデックスの削除 DROP INDEX
        • MySQLデータベースとOceanBaseデータベースのMySQL互換モード間のDDLの非互換点
          • 非互換点の概要
          • CREATE TABLEの非互換点
            • CREATE TABLEの非互換点
            • インデックスまたは制約でサポートされるフィールドタイプ
          • ALTER TABLEの非互換点
            • ALTER TABLEの非互換点
            • 制約のある列の型の変更
            • 制約のない列の型の変更
            • 制約のある列の長さの変更
            • 制約のない列の長さの変更
            • 制約を持つ列の削除
          • インデックスの削除DROP INDEXの非互換点
      • OceanBaseデータベースのMySQL互換モードからMySQLデータベースへのDDL同期
      • OracleデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期
        • OracleデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期の概要
        • テーブルの作成 CREATE TABLE
          • テーブル作成の概要
          • リレーショナルテーブルの作成
            • リレーショナルテーブルの作成
            • リレーショナルテーブルの列定義
          • 仮想列
          • 通常列
          • パーティションの作成
            • パーティションの概要
            • パーティション
            • サブパーティション
            • 複合パーティション
            • カスタムパーティション
            • サブパーティションテンプレート
          • 制約
            • 制約の概要
            • 行内制約
            • 行外制約
        • インデックスの作成 CREATE INDEX
          • インデックス作成の概要
          • 通常のテーブルインデックス
        • テーブルの変更 ALTER TABLE
          • テーブル変更の概要
          • テーブル属性の変更、削除、追加
          • 列属性の管理
            • 列属性の変更、削除、追加
            • 列名の変更
            • 列と列属性の追加
            • 列属性の変更
            • 列の削除操作
          • 制約の変更、削除、追加
          • パーティションの管理
            • パーティションの変更、削除、追加
            • パーティションの削除
            • サブパーティションの削除
            • パーティションとサブパーティションの追加
            • パーティションの変更
            • パーティションデータの削除
        • テーブルの削除 DROP TABLE
        • 名前の変更 RENAME OBJECT
        • テーブルの全行削除 TRUNCATE TABLE
        • インデックスの削除 DROP INDEX
        • OracleデータベースとOceanBaseデータベースのOracle互換モード間のDDLの非互換点
          • 非互換点の概要
          • CREATE TABLEの非互換点
          • ALTER TABLEの非互換点
            • ALTER TABLEの非互換点
            • 制約のある列の型の変更
            • 制約のない列の型の変更
            • 制約のある列の長さの変更
            • 制約のない列の長さの変更
      • OceanBaseデータベースのOracle互換モードからOracleデータベースへのDDL同期
      • DB2 LUWデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期
      • OceanBaseデータベースのOracle互換モードからDB2 LUWデータベースへのDDL同期
      • DB2 LUWデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
      • OceanBaseデータベースのMySQL互換モードからDB2 LUWデータベースへのDDL同期
      • OceanBaseデータベースのMySQL互換モード間でのDDL同期
      • OceanBaseデータベースのOracle互換モード間でのDDL同期
      • PostgreSQLデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
      • PostgreSQLデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期
      • OBShardingデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
  • データ同期
    • データ同期の概要
    • OceanBaseデータベースのデータをKafkaに同期する
    • OceanBaseデータベースのデータをRocketMQに同期する
    • OceanBaseデータベースのデータをDataHubに同期する
    • OceanBaseデータベースのデータをSwiftに同期する
    • ODPの論理テーブルデータをOceanBaseデータベースのMySQL互換モードの物理テーブルに同期する
    • ODPの論理テーブルデータをDataHubに同期する
    • IDBの論理テーブルデータをOceanBaseデータベースのMySQL互換モードに同期する
    • IDBの論理テーブルデータをDataHubに同期する
    • MySQLデータベースのデータをDataHubに同期する
    • OracleデータベースのデータをDataHubに同期する
    • OBShardingデータベースのデータをKafkaに同期する
    • データ同期タスクの管理
      • データ同期タスクの詳細を表示する
      • データ同期タスクの名前を変更する
      • 同期オブジェクトの表示と変更
      • タグを使用したデータ同期タスクの管理
      • データ同期タスクの一括操作
      • 同期対象設定のダウンロードとインポート
      • 同期パラメータ設定の確認と変更
      • データ同期タスクの開始と一時停止
      • データ同期タスクの終了と削除
  • データ検証
    • データ検証の概要
    • データ検証タスクの新規作成
    • データ検証タスクの管理
      • データ検証タスクの詳細を表示する
      • データ検証タスクの名前を変更する
      • 検証オブジェクトの表示と変更
      • 検証パラメータの確認と変更
      • タグを使用したデータ検証タスクの管理
      • 検証オブジェクトのインポート
      • データ検証タスクの開始、一時停止、および再開
      • データ検証タスクのクローン
      • データ検証タスクの削除
  • データソースの作成と管理
    • データソースの作成
      • OceanBaseデータソースの作成
        • OceanBase物理データソースの作成
        • ODPデータソースの作成
        • IDBデータソースの作成
        • OceanBaseパブリッククラウドデータソースの作成
        • OceanBase単一マシンデータソースの作成
      • MySQLデータソースの作成
      • Oracleデータソースの作成
      • TiDBデータソースの新規作成
      • Milvusデータソースの新規作成
      • Kafkaデータソースの作成
      • RocketMQデータソースの作成
      • DataHubデータソースの新規作成
      • Swiftデータソースの作成
      • DB2 LUWデータソースの作成
      • PostgreSQLデータソースの作成
      • PolarDB-X 1.0データソースの新規作成
      • OBShardingデータソースの作成
    • データソースの管理
      • データソース情報の表示
      • データソースのコピー
      • データソースの編集
      • データソースの削除
    • データベースユーザーの作成
    • ユーザー権限の説明
    • MySQLデータベースでBinlogを有効にする
    • ソース側Oracleデータベースの最小権限
  • 運用監視
    • 運用概要
    • 概要ページにアクセスする
    • マシン
      • マシン情報の表示
      • マシンの追加
      • マシンの削除
      • Quotaの更新
      • マシンのログを表示する
      • リソースグループの管理
    • コンポーネント
      • Store
        • Storeの追加
        • Storeコンポーネントの詳細を表示する
        • Storeコンポーネントの更新
        • Storeコンポーネントの起動と一時停止
        • Storeコンポーネントの削除
      • Incr-Sync
        • Incr-Syncコンポーネントの詳細を表示する
        • Incr-Syncコンポーネントの起動と一時停止
        • Incr-Syncコンポーネントの移行
        • Incr-Syncコンポーネントの更新
        • バッチ運用保守
        • Incr-Syncコンポーネントの削除
      • Full-Import
        • Full-Importコンポーネントの詳細を表示する
        • Full-Importコンポーネントの一時停止
        • Full-Importコンポーネントの再実行と再開
        • Full-Importコンポーネントの更新
        • Full-Importコンポーネントの削除
      • Full-Verification
        • Full-Verificationコンポーネントの詳細を表示する
        • Full-Verificationコンポーネントの一時停止
        • Full-Verificationコンポーネントの再実行と再開
        • Full-Verificationコンポーネントの更新
      • Incr-Verification
        • Incr-Verificationコンポーネントの詳細を表示する
        • Incr-Verificationコンポーネントの一時停止
        • Incr-Verificationコンポーネントの再実行と再開
        • Incr-Verificationコンポーネントの更新
      • Row-Verification
        • Row-Verificationコンポーネントの詳細を表示する
    • 運用管理タスク
      • オペレーションタスクの表示
      • タスクまたはサブタスクのスキップ
      • タスクまたはサブタスクの再試行
    • パラメータテンプレート
      • 概要
      • タスクテンプレート
        • タスクテンプレートの作成
        • タスクテンプレートの表示と編集
        • タスクテンプレートのコピーとエクスポート
        • タスクテンプレートの削除
      • コンポーネントテンプレート
        • コンポーネントテンプレートの作成
        • コンポーネントテンプレートの表示と編集
        • コンポーネントテンプレートのコピーとエクスポート
        • コンポーネントテンプレートの削除
      • コンポーネントパラメータの説明
        • Storeコンポーネントのパラメータ説明
        • Incr-Syncコンポーネントのパラメータ説明
        • Full-Importコンポーネントのパラメータ説明
        • Full-Verificationコンポーネントのパラメータ説明
        • Incr-Verificationコンポーネントのパラメータ説明
        • Row-Verificationコンポーネントのパラメータ説明
        • CMコンポーネントパラメータ説明
        • Supervisorコンポーネントのパラメータ説明
  • システム管理
    • 権限管理
      • 権限管理の概要
      • ユーザー管理
      • 部門管理
    • アラート管理
      • タスクのアラート情報を表示する
      • システムアラート情報の表示
      • アラート設定
    • OCPの関連付け
    • システムパラメータ
      • システムパラメータの変更
      • 高可用性機能の設定を変更する
      • oblogproxyパラメータの説明
    • キーの管理
    • 操作監査
  • トラブルシューティングガイド
    • OMSサービスの管理
    • OMSログのトラブルシューティング
    • コンポーネントの運用
      • Supervisorコンポーネントの運用
      • Connectorのコマンドライン操作インターフェース
      • Storeコンポーネントの運用
    • コンポーネントのチューニング
      • Incr-Sync/Full-Importのチューニング
      • Oracle Storeのチューニング
    • スロットリングとレート制限の設定方法
    • Storeコンポーネントのパフォーマンス診断について
  • リファレンスガイド
    • 機能紹介
      • DDL/DMLのカスタム設定
      • DDL同期範囲
      • データベース・テーブルの名前変更
      • SQL条件によるデータのフィルタリング
      • 増分同期の開始タイムスタンプの設定
      • 移行または同期オブジェクトのマッチングルールの設定
      • 検証対象のマッチングルールを設定する
      • ワイルドカード規則の説明
      • データ移行サービスの隠し列メカニズムについて
      • 構造移行操作の説明
      • ハートビートテーブルの作成と更新
      • Topicの変更
      • 列フィルタリングと列マッピング
      • データ形式の説明
    • APIリファレンス
      • 概要
      • タスクの作成
      • タスクの開始
      • タスクの一時停止
      • タスクの再開
      • タスクの解放
      • タスクの削除
      • タスクリストのページ単位の取得
      • タスクの詳細を照会する
      • タスクのステップの詳細を照会する
      • タスクのステップメトリクスの照会
      • タスクの進捗状況を照会する
      • タスクのコンポーネント情報を照会する
      • タスクの全量検証結果を照会する
      • 指定したラベルが付いた開始されていないすべてのタスクを開始する
      • 指定したラベルが付いた実行中のすべてのタスクを一時停止する
      • MySQLデータソースの作成
      • OceanBaseデータソースの作成
      • ODPデータソースの作成
      • PolarDB-X 1.0データソースの作成
      • Milvusデータソースの作成
      • データソースリストの取得
      • ラベルの作成
      • ラベルリストの取得
      • データソースの削除
      • 転送オブジェクトの変更
      • タスクの変更履歴を照会する
      • 変更操作の中止
      • 変更操作の再試行
      • 変更のキャンセル
      • タスクの事前チェック
      • 事前チェック結果の取得
      • タスク設定の更新
      • テーブル構造変換情報のダウンロード
      • 競合ログファイルのダウンロード
      • 競合ログファイルリストの取得
      • 正逆方向の増分同期の同期ポイントを変更する
      • タスクの実行を進める
      • リージョンリストの取得
      • ユーザーの作成
      • ユーザーの削除
      • ユーザー詳細の取得
      • 部門リストの取得
      • Kafka認証ファイルのアップロード
      • Kafkaデータソースの作成
      • DB2 LUWデータソースの作成
    • アラートリファレンス
      • oms_host_down OMSマシンダウンアラート
      • oms_host_down_migrate_resource OMSマシンダウン時の移行アラート
      • oms_host_threshold OMSマシンのしきい値アラート
      • oms_migration_failed 移行タスク失敗
      • oms_migration_delay 移行タスクの遅延
      • oms_sync_failed 同期タスクの失敗
      • oms_sync_status_inconsistent 同期タスクの状態が一致しない
      • oms_sync_delay 同期タスクの遅延
    • シングルサインオン
      • OMSにOIDCプロトコルを接続してシングルサインオンを実現する
      • OMSがSAML 2.0プロトコルに接続してシングルサインオンを実装する
      • OMS SAML 2.0によるMicrosoft Entra IDへのアクセス
    • OMSエラーコード
    • データベースオブジェクトのクエリ
    • トリガーの作成
    • PostgreSQLデータベースインスタンスのログレベルを変更する
    • Online DDLツールへの対応について
    • Oracleデータベースの補足ログに関する説明
    • Milvusトピックの設定
  • アップグレードガイド
    • 概要
    • シングルノードでのアップグレード
    • 複数ノードでのアップグレード
    • よくある質問
  • リリースノート
    • リリースノート
      • バージョン番号ルール
      • V4.3
        • OMS V4.3.3
        • OMS V4.3.2
        • OMS V4.3.1
        • OMS V4.3.0
      • V4.2
        • OMS V4.2.5
        • OMS V4.2.4
        • OMS V4.2.3
        • OMS V4.2.2
        • OMS V4.2.1
        • OMS V4.2.0
      • V4.1
        • OMS V4.1.0
      • V4.0
        • OMS V4.0.2
        • OMS V4.0.1
      • 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

PDF をダウンロード

このページには現在中国語/日本語版がなく、英語版を表示しています。
ドキュメントフィードバック
  1. ドキュメントセンター
  2. OceanBase移行サービス(OMS)
  3. V4.3.3

User privileges

最終更新:2026-09-04 08:13:48

User privileges required when a MySQL database serves as the source
User privileges required when a MySQL database serves as the target
User privileges required when the MySQL compatible mode of OceanBase Database serves as the source
User privileges required when the MySQL compatible mode of OceanBase Database serves as the target
User privileges required when an Oracle database serves as the source or the target
User privileges required for triggers of the target Oracle databases
User privileges required for DBA users in Oracle databases of a version earlier than 12c
User privileges required for non-DBA users in Oracle 12c and earlier
User privileges required for DBA users in Oracle Database 12c and later
User privileges required for non-DBA users in Oracle Database 12c and later
User privileges required on the source when migrating a PL object
User privileges required when the Oracle compatible mode of OceanBase Database serves as the source
User privileges required when the Oracle compatible mode of OceanBase Database serves as the target
User privileges required for the Oracle compatible mode of OceanBase Database V2.2.5 or V2.2.3
User privileges required for the Oracle compatible mode of OceanBase Database V2.2.7 or later
User privileges required on the target when migrating a PL object
User privileges required when a DB2 LUW database serves as the source or the target
User privileges required when a PostgreSQL databases serves as the source
User privileges required when a TiDB database serves as the source
User privileges required when a DataHub instance serves as the target
User privileges required when a Kafka database serves as the target
User privileges required when a RocketMQ database serves as the target

Before you migrate or synchronize data between databases by using OceanBase Migration Service (OMS), make sure that you have created a database user dedicated for migration or synchronization for each data source. This user must have the required privileges on the sources and targets.

User privileges required when a MySQL database serves as the source

  • The database user must have the read privilege on the database from which data is migrated. If the version of the MySQL database is 8.0, the user must also have the SHOW VIEW privilege. Execute the following statement to grant the privileges to the user:

    GRANT SELECT ON <database_name>.* TO '<user_name>';
    
  • During incremental synchronization from the MySQL database, the database user must have the REPLICATION CLIENT, REPLICATION SLAVE, and SELECT *.* privileges. Execute the following statement to grant the privileges to the user:

    GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO '<user_name>' [WITH GRANT OPTION];
    GRANT SELECT ON *.* TO '<user_name>';
    

    Note

    • If the user does not have the read privilege on all tables at the source, the task may be interrupted during incremental synchronization.

    • The WITH GRANT OPTION parameter is optional.

    If you select Allow OMS to automatically write heartbeat data into this instance during incremental synchronization. This resolves the problem of high latency when no business data is written in the source database. when you add the MySQL data source, OMS creates and updates the drc.heartbeat table in the MySQL database. In this case, the MySQL database user must have the privilege to create tables and write to tables. For more information, see Create and update a heartbeat table.

  • When you migrate data from a MySQL database to the MySQL compatible mode of OceanBase Database, if reverse increment is involved, the migration user must also have the CREATE, SELECT, INSERT, UPDATE, and DELETE privileges on the source test database.

    GRANT CREATE,SELECT,INSERT,UPDATE,DELETE ON test.* TO '<user_name>';
    

User privileges required when a MySQL database serves as the target

  • The database user must have the CREATE, CREATE VIEW, INSERT, UPDATE, and DELETE privileges on the target database.

    GRANT <privilege_type> ON <database_name>.<table_name> TO '<user_name>'@'<host_name>' [WITH GRANT OPTION];
    
    Parameter
    Description
    privilege_type The privileges to grant. You can grant CREATE, INSERT, UPDATE, and other operation privileges to the account. To grant all privileges to the account, set this parameter to ALL.
    database_name The name of the database. To grant operation privileges on all databases to the account, set this parameter to an asterisk (*).
    table_name The name of the table. To grant operation privileges on all tables to the account, set this parameter to an asterisk (*).
    user_name The account to which privileges are granted.
    host_name The host from which the account is allowed to log in to the database. To allow the account to log in to the database from any host, set this parameter to a percent sign (%).
    WITH GRANT OPTION Grants the account the privilege to use the GRANT command. This parameter is optional.
  • When you perform schema migration, you need the following privileges to migrate views and indexes.

    • To migrate views, you need the SELECT privilege on the database.

      GRANT SELECT ON <database_name>.* TO '<user_name>';
      
    • To migrate indexes, you need the INDEX privilege on the database.

      GRANT INDEX ON <database_name>.* TO '<user_name>';
      
  • The database user must have the trigger privilege.

    This privilege is used to check whether triggers exist in the target. If triggers exist, data inconsistency may occur.

    GRANT TRIGGER ON *.* TO '<user_name>';
    

    or

    GRANT TRIGGER ON <database_name>.* TO '<user_name>';
    
  • In a bidirectional synchronization task from OceanBase Database in MySQL compatible mode to a MySQL database, the target database user must have the SELECT, CREATE, INSERT, and UPDATE privileges on the oms database.

    GRANT SELECT, CREATE, INSERT, UPDATE ON oms.* TO '<user_name>';
    
  • When you create an incremental validation task, the database user must have the REPLICATION CLIENT and REPLICATION SLAVE privileges.

    GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO '<user_name>' [WITH GRANT OPTION];
    

User privileges required when the MySQL compatible mode of OceanBase Database serves as the source

If the MySQL compatible mode of OceanBase Database serves as the source, the migration or synchronization user must have the following privileges:

  • If the target is a Kafka, DataHub, or RocketMQ instance, the user must have the SELECT privilege on the source database from which data is to be synchronized.

    If the target is a MySQL database or the MySQL compatible mode of OceanBase Database, the user must have the SELECT privilege on the source database from which data is to be migrated and the oceanbase database.

    GRANT SELECT ON <database_name>.* TO '<user_name>';
    GRANT SELECT ON oceanbase.* TO '<user_name>';
    

    Notice

    You need to grant the SELECT privilege on the oceanbase database to the user only in OceanBase Database V4.0.0 and later.

  • In an incremental data synchronization scenario, you need to read incremental log data and database object schemas. Therefore, you need to create a user under the sys tenant of the source database and grant the SELECT ON *.* privilege to the user.

    GRANT SELECT ON *.* TO <drc_user>;
    
  • When you migrate data between MySQL-compatible tenants of OceanBase Database, if reverse increment is involved, the migration user must also have the CREATE, SELECT, INSERT, UPDATE, and DELETE privileges on the source test database.

    GRANT CREATE,SELECT,INSERT,UPDATE,DELETE ON test.* TO '<user_name>';
    

User privileges required when the MySQL compatible mode of OceanBase Database serves as the target

To synchronize data from the MySQL compatible mode of OceanBase Database to a Kafka, RocketMQ, or DataHub instance, the migration user must have the following privileges:

  • The user must have the CREATE, CREATE VIEW, DROP VIEW, SELECT, INSERT, UPDATE, ALTER, INDEX, and DELETE privileges on the target database.

    GRANT CREATE,CREATE VIEW,DROP VIEW,SELECT,INSERT,UPDATE,ALTER,INDEX,DELETE ON <database_name>.* TO '<user_name>';
    
  • The user must have the SELECT privilege on the entire tenant.

    GRANT SELECT ON *.* TO '<user_name>';
    
  • If the target is OceanBase Database V4.2.4 or later but earlier than V4.3.0, or OceanBase Database V4.3.3 or later:

    • The migration user must have the trigger privilege to check whether a trigger exists in the target. If a trigger exists, data may be inconsistent.

    • If you select schema migration when you create a data migration task and the database schema contains foreign key constraints, the migration user must also have the REFERENCES privilege on the database where the tables referenced by the foreign key constraints are located.

    You can grant the trigger and REFERENCES privileges on the corresponding database, or the global trigger and REFERENCES privileges.

    • Grant the trigger and REFERENCES privileges on the corresponding database.

      GRANT TRIGGER,REFERENCES ON <database_name>.* TO '<user_name>';
      
    • Grant the global trigger and REFERENCES privileges.

      GRANT TRIGGER,REFERENCES ON *.* TO '<user_name>';
      

User privileges required when an Oracle database serves as the source or the target

The user privileges required for forward migration when an Oracle database serves as the source are the same as those required for reverse migration when an Oracle database serves as the target. This section describes the user privileges required for different roles in different versions of Oracle databases.

Note

  • For a standby Oracle database in Active Data Guard (ADG) mode, the privileges granted may fail to take effect. In this case, you must execute the ALTER SYSTEM FLUSH SHARED_POOL; statement in the standby database to refresh the shared pool.

  • The user privileges described in this topic are not the minimum privileges. You must grant the following privileges to users: SELECT ANY TRANSACTION, SELECT ANY TABLE, and SELECT ANY DICTIONARY.
    When an Oracle database serves as the source, you can grant the minimum privileges to the migration user to improve security. For more information, see Minimum privileges required when an Oracle database serves as the source.

User privileges required for triggers of the target Oracle databases

When an Oracle database is used as the target, in addition to assigning corresponding privileges based on different versions, the CREATE ANY TRIGGER privilege is also required.

GRANT CREATE ANY TRIGGER TO <user_name>;

User privileges required for DBA users in Oracle databases of a version earlier than 12c

If the user's environment allows the migration user to be assigned the database administrator (DBA) role 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>;

User privileges required for non-DBA users in Oracle 12c and earlier

If the user environment is cautious about granting privileges to the migration user and the Oracle database version is before 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.

    Note

    If the Oracle data source has configured Obtain Incremental Data through Kafka, you do not need to grant the permissions related to LOGMINER.

    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. If the name of the schema to be migrated is the same as user_name, execute the following statement.

    GRANT CREATE SEQUENCE,CREATE VIEW TO <user_name>;
    

    If the name of the schema to be migrated is different from user_name, 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>;
    

    You can also 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>;
    # Add the table to which data needs to be migrated in the Oracle database.
    GRANT DELETE, INSERT, UPDATE ON <database name>.<table name> TO <user_name>;
    

User privileges required for DBA users in Oracle Database 12c and later

If the user's environment allows them to be assigned the database administrator (DBA) role and the Oracle database version is 12c or later, they need to determine whether to use a pluggable database (PDB) of 12c, 18c, or 19c.

  • Non-PDB

    1. Execute the following authorization statement to grant DBA privileges to the migration user.

      GRANT DBA TO <user_name>;
      
    2. Execute the following statement to grant the read privilege on the SYS.USER$ table to the migration user.

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

    If you migrate an Oracle database from an Oracle database of a version earlier than Oracle Database 12c, 18c, or 19c, you must use a common user account to pull data from the pluggable database (PDB).

    1. Execute the following statement to switch to the CDB$ROOT:

      ALTER SESSION SET CONTAINER=CDB$ROOT;
      

      Each common user can connect to the root container named CDB$ROOT and any PDB to which they have connection privileges and perform related operations.

    2. Execute the following statement to grant DBA privileges to the migration user.

      GRANT DBA TO C##XXX CONTAINER=ALL;
      
    3. Execute the following statement to grant the read privilege on the SYS.USER$ table to the migration user.

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

User privileges required for non-DBA users in Oracle Database 12c and later

If the user environment is cautious about granting privileges to the migration user and the Oracle database version is 12c or later, perform the following operations:

  • Non-PDB

    1. Grant the CONNECT privilege.

      GRANT CONNECT TO <user_name>;
      
    2. Execute the following statement to grant the read privilege on the SYS.USER$ table 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.

      Note

      If the Oracle data source has configured Obtain Incremental Data through Kafka, you do not need to grant the permissions related to LOGMINER.

      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. If the name of the schema to be migrated is the same as user_name, execute the following statement.

      GRANT CREATE SEQUENCE,CREATE VIEW TO <user_name>;
      

      If the name of the migrated schema is different from user_name, 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>;
      
  • PDB

    If the source Oracle database is a pluggable database (PDB) of Oracle Database 12c, 18c, or 19c, the account used to pull data from the PDB must be a common user.

    1. Grant the CONNECT privilege.

      GRANT CONNECT TO <C##XXX> CONTAINER=ALL;
      
    2. Execute the following statement to grant the read privilege on the SYS.USER$ table 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.

      Note

      If the Oracle data source has configured Obtain Incremental Data through Kafka, you do not need to grant the permissions related to LOGMINER.

      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. If the name of the schema to be migrated is C##XXX, execute the following statement.

      GRANT CREATE SEQUENCE, CREATE VIEW TO <C##XXX> CONTAINER=ALL;
      

      If the name of the migrated schema is not C##XXX, 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 <C##XXX> CONTAINER=ALL;
      

User privileges required on the source when migrating a PL object

When migrating a PL object from an Oracle database to the Oracle compatible mode of OceanBase database, the migration user of the source PL object must have the following privileges:

GRANT CREATE ANY PROCEDURE TO <user_name>;
GRANT CREATE ANY TYPE TO <user_name>;
GRANT SELECT ANY SEQUENCE TO <user_name>;
GRANT CREATE ANY TRIGGER TO <user_name>;

User privileges required when the Oracle compatible mode of OceanBase Database serves as the source

When the Oracle compatible mode of OceanBase Database serves as the source, the migration/synchronization user requires the following privileges:

  • For OceanBase Database Oracle compatible mode prior to V2.2.70, the privilege required for the source migration user is GRANT SELECT ON *.* TO '<user_name>';.

  • For OceanBase Database Oracle compatible mode V2.2.70 or later, the privilege required for the source migration user is GRANT DBA TO '<user_name>';.

    • For OceanBase Database Oracle compatible mode V4.0.0 or later, the source migration user also needs the SELECT privilege on DBA_OB_ARCHIVELOG.

      GRANT SELECT ON DBA_OB_ARCHIVELOG TO '<user_name>';
      
    • For OceanBase Database Oracle compatible mode V4.2.0 or later, the source migration user also needs the SELECT privilege on DBA_OB_TABLE_LOCATIONS.

      GRANT SELECT ON DBA_OB_TABLE_LOCATIONS TO '<user_name>';
      

User privileges required when the Oracle compatible mode of OceanBase Database serves as the target

The privileges required vary with the version of the Oracle compatible mode of the target OceanBase Database.

User privileges required for the Oracle compatible mode of OceanBase Database V2.2.5 or V2.2.3

You can grant privileges to the migration user by using one of the following two methods:

  • Method 1

    • Execute the following statement to grant all privileges to the migration user. This method is simple but high-level privileges are granted.

      GRANT ALL PRIVILEGES ON *.* TO '<user_name>';
      
  • Method 2

    1. Grant the SELECT privilege on system views in the SYS tenant to the migration user.

      GRANT SELECT ON SYS.* TO '<user_name>';
      
    2. Grant all types of privileges to the migration user on the business tables. If multiple business databases exist, grant the privileges separately.

      GRANT SELECT, UPDATE, DELETE ON *.* TO '<user_name>';
      GRANT CREATE, INDEX, ALTER ON *.* TO '<user_name>';
      

User privileges required for the Oracle compatible mode of OceanBase Database V2.2.7 or later

You can grant privileges to the migration user by using one of the following two methods:

  • Method 1

    Execute the following statement, which is simple but grants a high level of privileges to the user.

    GRANT DBA TO '<user_name>';
    
  • Method 2

    Grant all kinds of privileges on business tables to the user. If there are multiple business databases, grant the privileges separately.

    GRANT CONNECT TO '<user_name>';
    GRANT CREATE SESSION, ALTER SESSION, SELECT ANY TABLE, SELECT ANY DICTIONARY TO '<user_name>';
    GRANT CREATE ANY TABLE, CREATE ANY INDEX, CREATE ANY VIEW, INSERT ANY TABLE, UPDATE ANY TABLE, ALTER ANY TABLE, DELETE ANY TABLE TO '<user_name>';
    

User privileges required on the target when migrating a PL object

When migrating a PL object from an Oracle database to the Oracle compatible mode of OceanBase database, the migration user of the target must have the following privileges:

GRANT CREATE ANY PROCEDURE TO '<user_name>';
GRANT CREATE ANY SYNONYM TO '<user_name>';
GRANT CREATE ANY SEQUENCE TO '<user_name>';
GRANT CREATE ANY TRIGGER TO '<user_name>';
GRANT CREATE ANY TYPE TO '<user_name>';

Note

If the Oracle compatible mode of OceanBase Database V3.0.0 or later serves as the target, the migration user must have the CREATE ANY TRIGGER privilege.

User privileges required when a DB2 LUW database serves as the source or the target

The migration user must have the DBADM privilege when a DB2 LUW database serves as the source or the target.

  1. Connect to the target database.

    db2 CONNECT TO <database_name>
    
  2. Grant the database administrator privilege to the migration user.

    db2 GRANT DBADM ON DATABASE TO USER <user_name>;
    

User privileges required when a PostgreSQL databases serves as the source

During the schema migration from a PostgreSQL database to the MySQL compatible mode of OceanBase Database, you must grant the SELECT privilege on tables and views to the migration user.

During the incremental synchronization phase from a PostgreSQL database to the MySQL compatible mode database of OceanBase Database, you must grant the following privileges to the migration user:

  • If the whitelist of tables to be migrated contains wildcard characters, you must use the superuser privilege, otherwise an error will be returned when the publication is created. If no wildcard character is contained, the superuser privilege is not required.

  • You must have the REPLICATION and LOGIN roles, and the CREATE PUBLICATION privilege.

    • CREATE USER <user_name> REPLICATION LOGIN ENCRYPTED PASSWORD '<password>';

    • GRANT CREATE ON DATABASE <database_name> TO <user_name>;

  • The migration user must be the Owner of the table to be migrated.

    // Create replication_group.
    CREATE ROLE <replication_group>;  
    // Add the original Owner of the table to be migrated to replication_group.
    GRANT <replication_group> TO <original_owner>; 
    // Add the migration user to replication_group too.
    GRANT <replication_group> TO <replication_user>; 
    // Modify the Owner of the table to be replication_group.
    ALTER TABLE <table_name> OWNER TO <replication_group>; 
    
  • If you select Allow OMS to automatically write heartbeat data into this instance during incremental synchronization. This resolves the problem of high latency when no business data is written in the source database. when you add the PostgreSQL data source, OMS creates and updates the oms_postgres_heartbeat table in the PostgreSQL database. In this case, the PostgreSQL database user must have the privilege to create tables and write to tables. For more information, see Create and update a heartbeat table.

User privileges required when a TiDB database serves as the source

The migration user of a TiDB database must have the full SELECT privilege.

GRANT SELECT ON *.* TO '<user_name>';

User privileges required when a DataHub instance serves as the target

Datahub instances are authenticated based on the endpoint, access key ID (AK), and secret access key (SK). For more information, see DataHub access control.

The user of a DataHub instance must have the GetProject, CreateTopic, ListTopic, GetTopic, ListShard, PutRecords, GetRecords, and GetCursor privileges.

User privileges required when a Kafka database serves as the target

If authentication is required for Kafka, see Create a Kafka data source.

When a Kafka server serves as the target, the synchronization user must have the permissions to perform the following operations:

  • Create and view topics.

  • View topic partition information.

  • Write a record.

  • Read a record.

User privileges required when a RocketMQ database serves as the target

To synchronize data to a RocketMQ instance, the user must have privileges to perform the following operations:

  • Create and view topics.

  • View the topic message queue information.

  • Write records.

  • Read records.

次のトピック

OMSドキュメント
次へ
このページの内容
User privileges required when a MySQL database serves as the source
User privileges required when a MySQL database serves as the target
User privileges required when the MySQL compatible mode of OceanBase Database serves as the source
User privileges required when the MySQL compatible mode of OceanBase Database serves as the target
User privileges required when an Oracle database serves as the source or the target
User privileges required for triggers of the target Oracle databases
User privileges required for DBA users in Oracle databases of a version earlier than 12c
User privileges required for non-DBA users in Oracle 12c and earlier
User privileges required for DBA users in Oracle Database 12c and later
User privileges required for non-DBA users in Oracle Database 12c and later
User privileges required on the source when migrating a PL object
User privileges required when the Oracle compatible mode of OceanBase Database serves as the source
User privileges required when the Oracle compatible mode of OceanBase Database serves as the target
User privileges required for the Oracle compatible mode of OceanBase Database V2.2.5 or V2.2.3
User privileges required for the Oracle compatible mode of OceanBase Database V2.2.7 or later
User privileges required on the target when migrating a PL object
User privileges required when a DB2 LUW database serves as the source or the target
User privileges required when a PostgreSQL databases serves as the source
User privileges required when a TiDB database serves as the source
User privileges required when a DataHub instance serves as the target
User privileges required when a Kafka database serves as the target
User privileges required when a RocketMQ database serves as the target