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

Configure matching rules for migration or synchronization objects

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

Background information
Database-to-database wildcard rules
Wildcard rules for mapping databases to message queues
Limitations
Considerations
Configure database-to-database wildcard rules matching rules
Scenario examples
Configure matching rules for mapping databases to message queues
FAQ

This topic describes the background information, limitations, and configuration methods of matching rules for migration/synchronization objects, and provides examples and frequently asked questions about matching rules in the scenario of database to database.

Background information

When you create a data migration or synchronization task, you need to specify the migration or synchronization objects. OMS provides three methods for you to choose from: specified objects, imported objects, and matching rules. The matching rules method allows you to write wildcard rules to specify the objects for migration or synchronization. It also supports configuring object mappings between the source and target. With simple and efficient string matching capabilities, it can significantly reduce the configuration difficulty when a large number of objects are to be migrated or synchronized. Additionally, new tables that match the specified rules can be automatically synchronized to the target through incremental DDL operations. For more information about incremental DDL operations, see Supported DDL operations and limits.

Database-to-database wildcard rules

OMS supports the following database-to-database wildcard rules and provides the descriptions.

Note

The asterisk (*) in the following table represents a wildcard.

Category
Supported wildcard rule
Example
Description
Database and table migration *.* kd_test*.person* Migrate all tables whose names start with "person" in all databases whose names start with "kd_test" from the source to the target, without changing the database or table names.
Database and table migration *.<source table> kd_test*.person Migrate the table named "person" in all databases whose names start with "kd_test" from the source to the target, without changing the database or table names.
Database and table migration <source database>.* kd_test.person* Migrate all tables whose names start with "person" in the database named "kd_test" from the source to the target, without changing the database or table names.
Database and table migration <source database>.<source table> kd_test.person Migrate the table named "person" in the database named "kd_test" from the source to the target, without changing the database or table names.
Database and table renaming <source database>.<source table>=<target database>.<target table> kd_test.person=kd_test_new.person_new Migrate the table named "person" in the database named "kd_test" to the target, and rename the source database to kd_test_new and the source table to person_new.
Database and table renaming <source database>.*=<target database>.* kd_test.person*=kd_test_new.person* Migrate all tables whose names start with "person" in all databases whose names start with "kd_test" to the target, and rename the source database to kd_test_new, keeping the table names unchanged.
Database and table renaming *.<source table>=*.<target table> kd_test*.person=kd_test*.person_new Migrate all tables named "person" in all databases whose names start with "kd_test" to the target, and rename the source table to person_new, keeping the database names unchanged.
Multi-table aggregation <source database>.*=<target database>.<target table> kd_test.person*=kd_test.person_all Aggregate all tables whose names start with "person" in the database named "kd_test" to the table named "person_all" in the target database.
Multi-table aggregation *.<source table>=<target database>.<target table> kd_test*.person=kd_test_all.person Aggregate all tables named "person" in all databases whose names start with "kd_test" to the table named "person" in the target database named "kd_test_all".
Multi-table aggregation *.*=<target database>.<target table> kd_test*.person*=kd_test_all.person_all Aggregate all tables whose names start with "person" in all databases whose names start with "kd_test" to the table named "person_all" in the target database named "kd_test_all".
Multi-table aggregation *.*=<target database>.* kd_test*.person*=kd_test_all.person* Aggregate all tables whose names start with "person" in all databases whose names start with "kd_test" to the target database named "kd_test_all", keeping the table names unchanged.
Multi-table aggregation *.*=*.<target table> kd_test*.person*=kd_test*.person_all Aggregate all tables whose names start with "person" in all databases whose names start with "kd_test" to the table named "person_all" in the target databases whose names start with "kd_test", keeping the database names unchanged.

The wildcard rules are subject to the following requirements:

  • The names of the databases and tables at the target cannot both be wildcard expressions. For example, kd_test*.person*=kd_test*.person*.

  • If the source and target databases are both wildcard expressions, the database-level expressions must be identical, indicating database migration.

  • If the source and target tables are both wildcard expressions, the table-level expressions must be identical, indicating table migration.

  • If the name of the target database is a wildcard expression, the name of the source database must also be a wildcard expression.

  • If the name of the target table is a wildcard expression, the name of the source table must also be a wildcard expression.

Wildcard rules for mapping databases to message queues

OMS supports the following wildcard rules for mapping databases to a message queue:

Note

The asterisk (*) in the following table represents a wildcard.

Supported wildcard rule
Example
Description
*.*= *.*=topic Maps multiple tables in multiple databases to one topic.
*.= *.b=topic Maps multiple tables in one topic.
.*= a.*=topic Maps multiple tables in one database to one topic.
.= a.b=topic Maps one table in one database to one topic.

Limitations

  • OMS allows you to enter multiple rules, but each rule must be entered on a single line without leading or trailing spaces.

  • Migration or synchronization object rules cannot be empty, but exclusion object rules can be empty.

  • OMS does not support DDL changes during schema migration or full migration.

  • OMS does not support selecting tables whose names contain special characters (spaces, line breaks, or .|"'`()=;/&*?[][!]) as migration or synchronization objects by using multiple matching rules.

  • OMS does not support mapping tables in different databases in the target to tables in different databases in the source based on multiple matching rules. For example, a.a* = b.a* & a.b* = c.b*.

  • In the multi-table aggregation scenario, reverse increment is not supported.

    Note

    OMS only judges whether there is a aggregation scenario based on the existence of the existing databases and tables when saving or starting a data migration/data synchronization task. If the multi-table aggregation scenario newly emerges during the task execution, it will not be intercepted by OMS. This may result in the reverse increment being unable to correctly identify the database-table mapping relationship, leading to data quality issues.

  • OMS does not support the CREATE DATABASE DDL statement. If the name of a new database is included in the migration or synchronization rules, you need to manually create the database in the target before you can synchronize data in the new database.

Considerations

  • After you configure the migration/synchronization object rules and exclusion object rules, if the source table name is in the difference set between the migration/synchronization object rules and exclusion object rules, the related object can be selected.

    Note

    The difference set between two sets refers to a new set that contains all elements in the first set but not in the second set.

  • After the DDL synchronization feature is enabled, if you create a new table or modify the schema of a table by using DDL statements in the source, the related DDL statement can be synchronized from the source to the target only if the table name is in the difference set between the migration/synchronization object rules and exclusion object rules.

  • In the multi-table aggregation scenarios:

    • We recommend that you configure the mappings between the source and target databases based on matching rules.

    • We recommend that you manually create schemas in the target database. If you use OMS to create schemas, make sure to skip failed objects in the schema migration step.

    • If you select DDL synchronization for multi-table aggregation, there is a risk of accidental deletion. For example, multiple databases or tables in the source are aggregated to a single database or table in the target. In this case, if you delete a database or table in the source, the corresponding aggregated database or table in the target may also be deleted.

    • When you create a data migration task, set Full Migration > Handle Non-empty Tables in Target Database to Ignore.

      Note

      If you select Ignore, full verification will use IN mode to fetch data. This mode cannot verify whether the target contains data not in the source, and the verification performance will be degraded.

  • If a table is mapped to a new name, the renaming mapping takes precedence. For example, if both the rules a.b[0-3] and a.b[3-5]=a.c exist, the table a.b3 will be renamed to a.c.

  • When the RENAME TABLE DDL statement is being executed, if the renamed table object is not in the original matching rules or exclusion rules, it may lead to unexpected synchronization. Proceed with caution.

Configure database-to-database wildcard rules matching rules

  1. Create a data migration task and configure the task until the Select Migration Objects step.

    For more information, see Data migration tasks of the corresponding type.

  2. In the Select Migration Objects section, select Match by Rule.

  3. Enter the Object Migration Rules and Object Exclusion Rules (optional). For more information about supported matching rules, see Wildcard rules.

    Note

    If the rules you configured contain spaces, it may cause errors in the migration objects.

    When you migrate data from an Oracle database to the Oracle compatible mode of OceanBase Database:

    • If you selected Schema Migration in the Migration Type step, you can select sequences, types, tables, views, stored procedures, functions, packages, and synonyms in one or more source databases as migration objects.

      Notice

      If you selected only Schema Migration in the Migration Type step, you must select at least one migration object. If you select other migration types except Schema Migration, you must select at least one table object.

      The following objects will be migrated only if you selected Schema Migration in the Migration Type step. The migration timing for different types of objects is as follows:

      • Tables, views, stored procedures, functions, synonyms, types, and packages will be automatically migrated during schema migration.

      • The migration timing for indexes and triggers can be set in the migration options.

      • Sequences, constraints, and foreign keys will be migrated during forward switching.

    • If you did not select Schema Migration in the Migration Type step, you can select only tables in one or more databases as migration objects.

    • PL objects such as views, functions, and stored procedures cannot be renamed or set with row filter conditions.

  4. Click Verify.

    If you want to view the matching results, click Preview Objects after the validation is successful. The wildcard migration object rules and exclude object rules that you configured will be applied to tables and views. Matching Results shows the final objects, new objects, and reduced objects.

    Object
    Description
    Final Objects The migration objects that are finally matched by the configured matching rules.
    New Objects The migration objects added in the final match results compared with the previous configuration.
    Reduced Objects The migration objects reduced in the final match results compared with the previous configuration.

    After you use matching rules to select the migration objects, you can set filter conditions.

    1. In the Matching Results > Final panel, hover the pointer over the target table object.

    2. Click the displayed Settings.

    3. In the Settings dialog box, enter the WHERE clause of a standard SQL statement to configure row filters. After you configure the filter conditions, click Validate Syntax. For more information, see Filter data by using SQL conditions.

    4. If the syntax is valid, click OK.

      You can also view the column information of the migration object in the View Column section.

  5. Complete subsequent task configurations as prompted.

Scenario examples

  • Schema migration

    Migrate all tables starting with "test" in databases starting with "jenkins_api" from the source to the target, without changing the database or table names. The following figure shows the configuration of matching rules.

    migration-30-en

  • Database and table renaming

    Migrate all tables starting with "test" in the jenkins_my2dh_one database to the target, and rename the jenkins_my2dh_one database to jenkins_my2dh_one_new without changing the table names. The following figure shows the configuration of matching rules.

    migration-31-en

  • Multi-table aggregation

    Aggregate all tables starting with "order" in databases starting with "jenkins_api" to the order table in the jenkins_api_all database. The following figure shows the configuration of matching rules.

    migration-32-en

  • Configure exclusion rules

    Configure rules to exclude the migration of historical tables and log tables in the jenkins_api_mysql56 database. Historical tables start with "history_", and log tables end with "log". The following figure shows the configuration of matching rules.

    migration-33-en

Configure matching rules for mapping databases to message queues

When you synchronize data to DataHub, Kafka, or RocketMQ, you can configure matching rules to specify the objects to synchronize.

  1. Create a data synchronization task and configure the task settings to the Select Synchronization Objects step.

    For more information, see Data synchronization tasks.

  2. In the Select Synchronization Objects section, select Match by Rule.

    oms13-en

  3. Enter Object Synchronization Rules and Object Exclusion Rules (optional). For more information about supported matching rules, see Wildcard rules.

    The business logic for configuring matching rules varies for the three types of data synchronization tasks.

    • If the target is a DataHub instance, you can select a topic of the Tuple or BLOB type.

      • When you select Tuple as the topic type, you can only enter existing topic names, and cannot use wildcards or spaces. After you select a table, it will be mapped to a topic on a one-to-one basis.

      • When you select BLOB as the topic type, you can use one-to-many or one-to-one mapping. However, you cannot use spaces.

        If you select Schema synchronization, you can enter existing topic names or create new topics. You can only choose one mapping method to create or select topics. If you do not select Schema synchronization, you can only enter existing topic names.

    • If the target is a Kafka or RocketMQ instance, you can use one-to-many or one-to-one mapping. However, you cannot use spaces.

      If you select Schema synchronization, you can enter existing topic names or create new topics. If you do not select Schema synchronization, you can only enter existing topic names.

  4. Click Verify.

    After the configuration is verified, you can click Preview Objects to view the matching results. The Matching Results section shows the final objects, new objects, and reduced objects.

    After you specify the matching rules, you can filter objects and specify the sharding columns.

    oms14-en

    1. In the Matching Results > Final panel, hover the pointer over the target table object.

    2. Click the displayed Settings icon.

    3. In the Settings dialog box, you can perform the following operations.

      • When you synchronize an object from an OceanBase database, enter a standard SQL WHERE clause in the text box in the Row Filters section to specify the row filter condition. After you configure the row filter condition, click Validate Syntax. For more information, see Filter data by using SQL conditions.

      • Select the target sharding column from the Sharding Columns drop-down list. You can select multiple fields as the sharding column. This parameter is optional.

        By default, you can select the primary key. If the primary key is unevenly loaded, you can select a uniquely identified field with relatively balanced load as the sharding column to avoid potential performance issues. The sharding column serves the following purposes:

        • Load balancing: In the case of concurrent writes in the target, the sharding column identifies the specific thread that is used to send messages.

        • Order: To avoid the disorder that can be caused by concurrent writes, OMS ensures that messages received by users are in order when the values in the sharding column are the same. Here, order refers to the change order (the execution order of DML operations on a column).

    4. Click OK.

FAQ

  • Insufficient privileges

    Check the permissions of the source user. If the user does not have sufficient permissions, OMS may fail to display some objects, which prevents you from correctly configuring the matching rules. In this case, you need to add the objects that cannot be displayed to Object Exclusion Rules to prevent the interruption of data migration or synchronization tasks because OMS cannot find the corresponding objects.

  • Filtering out DML statements is not supported

    If you do not enable DDL synchronization, OMS allows you to select objects based on matching rules. During incremental synchronization, if a new table matches the rules, OMS will ignore the corresponding DDL statements but continue to synchronize the DML statements. This will cause the failure to write data to the target table, which can interrupt data migration or synchronization tasks. In this case, you can create a new table in the target or add the table to the blocklist.

次のトピック

OMSドキュメント
次へ
このページの内容
Background information
Database-to-database wildcard rules
Wildcard rules for mapping databases to message queues
Limitations
Considerations
Configure database-to-database wildcard rules matching rules
Scenario examples
Configure matching rules for mapping databases to message queues
FAQ