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

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

Background information
Wildcard patterns for data migration or synchronization between databases
Wildcard patterns for data migration or synchronization between a database and a message queue instance
Limitations
Considerations
Configure matching rules between databases
Sample scenarios
Configure matching rules for data migration or synchronization from a database to a message queue instance
FAQ

This topic describes the background information, limitations, procedure, scenarios, and troubleshooting tips for configuring matching rules for migration or synchronization objects.

Background information

When you create a data migration or synchronization task, you must specify the objects to migrate or synchronize. To do so, OceanBase Migration Service (OMS) allows you to specify the names of objects, import objects, and specify matching rules for objects. You can configure wildcard-based matching rules to specify migration or synchronization objects. You can also configure object mapping logic between the source and target databases. This allows you to specify a large number of objects to be migrated or synchronized in a simple and efficient manner. If a new source table meets a matching rule, the DDL statement that created the table can be automatically synchronized to the target database. For more information, see Supported DDL operations for synchronization and limitations.

Wildcard patterns for data migration or synchronization between databases

The following table describes the wildcard patterns supported by OMS for data migration or synchronization between databases.

Note

In the following table, an asterisk (*) indicates a wildcard.

Category
Supported rule
Example
Description
Direct migration *.* kd_test*.person* All tables whose names start with person in all databases whose names start with kd_test are migrated from the source to the target. The source database names and table names remain unchanged.
Direct migration *.<source table> kd_test*.person All tables named person in all databases whose names start with kd_test are migrated from the source to the target. The source database names and table names remain unchanged.
Direct migration <source database>.* kd_test.person* All tables whose names start with person in the database named kd_test are migrated from the source to the target. The source database name and table names remain unchanged.
Direct migration <source database>.<source table> kd_test.person The table named person in the database named kd_test is migrated from the source database to the target database. The source database name and table name remain unchanged.
Migration object renaming <source database>.<source table>=<target database>.<target table> kd_test.person=kd_test_new.person_new The table named person in the database named kd_test is migrated from the source database to the target database. The kd_test database is renamed as kd_test_new, and the person table is renamed as person_new.
Migration object renaming <source database>.*=<target database>.* kd_test.person*=kd_test_new.person* All tables whose names start with person in the database named kd_test are migrated from the source to the target. The kd_test database is renamed as kd_test_new, and the source table names remain unchanged.
Migration object renaming *.<source table>=*.<target table> kd_test*.person=kd_test*.person_new All tables named person in all databases whose names start with kd_test are migrated from the source to the target. The tables are renamed as person_new, and the source database names remain unchanged.
Database or table aggregation <source database>.*=<target database>.<target table> kd_test.person*=kd_test.person_all All tables whose names start with person in the source database named kd_test are aggregated to the person_all table in the target kd_test database.
Database or table aggregation *.<source table>=<target database>.<target table> kd_test*.person=kd_test_all.person All tables named person in all source databases whose names start with kd_test are aggregated to the person table in the target kd_test_all database.
Database or table aggregation *.*=<target database>.<target table> kd_test*.person*=kd_test_all.person_all All tables whose names start with person in all source databases whose names start with kd_test are aggregated to the person_all table in the target kd_test_all database.
Data aggregation migration *.*=<target database>.* kd_test*.person*=kd_test_all.person* All tables whose names start with person in all source databases whose names start with kd_test are aggregated to the target kd_test_all database. The source table names remain unchanged.
Database or table aggregation *.*=*.<target table> kd_test*.person*=kd_test*.person_all All tables whose names start with person in all source databases whose names start with kd_test are aggregated to the person_all table in the target databases whose names start with kd_test. The source database names remain unchanged.

The requirements for matching rules are as follows:

  • You cannot use wildcards for both database and table names of the source database, such as kd_test*.person*=kd_test*.person*.

  • If you use wildcards for both the source and target databases, the database expression must be the same for the source and target databases, indicating direct migration between databases.

  • If you use wildcards for both the source and target tables, the table expression must be the same for the source and target tables, indicating direct migration between tables.

  • If you use a wildcard for target databases, you must also use a wildcard for source databases.

  • If you use a wildcard for target tables, you must also use a wildcard for source tables.

Wildcard patterns for data migration or synchronization between a database and a message queue instance

The following table describes the wildcard patterns supported by OMS for data migration or synchronization between a database and a message queue instance.

Note

In the following table, an asterisk (*) indicates a wildcard.

Supported rule
Example
Description
*.*= *.*=topic Multiple tables in multiple databases are mapped to one topic.
*.= *.b=topic The tables named b in multiple databases are mapped to one topic.
.*= a.*=topic Multiple tables in database a are mapped to one topic.
.= a.b=topic Table b in database a is mapped to a topic.

Limitations

  • OMS allows you to specify multiple rules. Each rule occupies a single row, and spaces are not allowed before or after a rule.

  • Matching rules for migration or synchronization objects must not be empty. Object exclusion rules can be empty.

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

  • When you configure matching rules to select migration or synchronization objects, table names cannot contain line breaks, spaces, or the following special characters: . | " ' ` () = ; / & * ? [] [!].

  • OMS does not allow you to configure multiple matching rules to map different tables in the same source database to different target databases, such as a.a* = b.a* & a.b* = c.b*.

  • In a scenario of database or table aggregation, reverse increment is not supported.

    Note

    OMS checks whether database or table aggregation exists only when a data migration or synchronization task is saved or started. OMS does not block reverse increment if database or table aggregation occurs during the running of a task. In this case, data quality may be compromised because reverse increment may fail to identify mappings between the source and target databases or tables.

  • At present, OMS does not support the DDL statement CREATE DATABASE. If a new source database meets the object matching rules, you must manually create a corresponding target database to continue with the data synchronization of the new database.

Considerations

  • After you configure object matching rules and exclusion rules, objects that are within the difference set of the object matching and exclusion rules can be selected.

    Note

    A difference set between two sets contains all elements that exist in one set but do not exist in the other set.

  • After DDL synchronization is enabled, when you use a DDL statement to create a new table or modify the schema of a table in the source database, if the table is within the difference set of the object matching and exclusion rules, OMS can synchronize this DDL statement to the target database.

  • Take note of the following considerations in a scenario where database or table aggregation is enabled:

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

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

    • If you select DDL Synchronization, databases or tables may be deleted by mistake. For example, when multiple source databases or tables are aggregated to a single target database or table, if a source database or table is dropped, the target aggregated database or table may be dropped.

    • When you create a data migration task, click Full Migration and select Ignore for Handle Non-empty Tables in Target Database.

      Note

      If you select Ignore, data is pulled in IN mode for full verification. In this case, the scenario where the target table contains more data than the source table cannot be verified, and the verification efficiency will be decreased.

  • If a renaming mapping rule is configured for tables, the renaming mapping rule takes precedence. For example, if the rules a.b[0-3] and a.b[3-5]=a.c are configured, the a.b3 table is renamed as a.c.

  • When you execute the RENAME TABLE DDL statement, if the new table name falls out of the original match rules or exclusion rules, unexpected synchronization errors may occur. Proceed with caution.

Configure matching rules between databases

  1. Create a data migration task and proceed to the Select Migration Objects step.

    For more information, see the topics about data migration tasks of the corresponding data source types.

  2. In the Select Migration Objects section, select Match Rules.

    oms11-en

  3. In the Specify Migration Scope section, specify object migration rules in the Object Migration Rules field and object exclusion rules in the Object Exclusion Rules field. The Object Exclusion Rule field is optional. For more information, see Wildcard patterns supported for matching rules.

    Note

    If the configured rule contains spaces, the object migration task may fail.

  4. Click Verify.

    To view the matching results, click Preview Objects after the verification succeeds. The wildcard-based matching rules and exclusion rules apply to tables and views. The matching results are displayed on the Final, Added, and Reduced tabs on the Matching Results page.

    Object
    Description
    Final Displays the migration objects that are hit by the specified matching rules.
    Added Displays the migration objects that are not in the result of the previous matching.
    Reduced Displays the migration objects that are only in the result of the previous matching.

    After you configure matching rules for selecting migration objects, you can set filter conditions.

    oms12-en

    1. Choose Matching Results > Final and move the pointer over the target table object.

    2. Click Settings.

    3. In the Settings dialog box, specify a standard SQL WHERE clause to filter data by row. Then, click Validate Syntax. For more information, see Use SQL conditions to filter data.

    4. After the syntax validation is passed, click OK.

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

  5. Complete subsequent task settings as prompted.

Sample scenarios

  • Direct migration

    Migrate all tables whose names start with test in all source databases whose names start with jenkins_api to the target, and retain the original database and table names. Configure the matching rules as shown in the following figure.

    migration-30-en

  • Migration object renaming

    Migrate all tables whose names start with test in the source database named jenkins_my2dh_one to the target, rename the jenkins_my2dh_one database as jenkins_my2dh_one_new, and retain the original table names. Configure the matching rules as shown in the following figure.

    migration-31-en

  • Database or table aggregation

    Aggregate all tables whose names start with order in all source databases whose names start with jenkins_api to the order table in the target jenkins_api_all database. Configure the matching rules as shown in the following figure.

    migration-32-en

  • Configuration of object exclusion rules

    Exclude historical tables whose names start with history_ and log tables whose names end with log in the source jenkins_api_mysql56 database from migration. Configure the matching rules as shown in the following figure.

    migration-33-en

Configure matching rules for data migration or synchronization from a database to a message queue instance

When you synchronize data from OceanBase Database to a DataHub, Kafka, or RocketMQ instance, you can configure matching rules to select the objects to synchronize.

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

    For more information, see the topics about data synchronization tasks of the corresponding data source types.

  2. In the Select Synchronization Objects section, select Match Rules.

    oms13-en

  3. Specify object synchronization rules in the Object Synchronization Rule field and object exclusion rules in the Object Exclusion Rule field. The Object Exclusion Rule field is optional. For more information, see Wildcard patterns supported for matching rules.

    When you configure matching rules, the business logic depends on the types of data synchronization tasks.

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

      • For the Tuple type, you can enter only existing topic names without wildcards or spaces. After you select tables, they are mapped to topics in a one-to-one manner.

      • For the BLOB type, many-to-one and one-to-one mapping methods are supported, and no spaces are allowed.

        If you have selected Schema Synchronization when you specified the synchronization types, you can choose to enter the name of an existing topic or create a new topic. You can select only one mapping method to create or select a topic. If you did not select Schema Synchronization when you specified the synchronization types, you can enter only the name of an existing topic.

    • If the target is a Kafka or RocketMQ instance, many-to-one and one-to-one mapping methods are supported, and no spaces are allowed.

      If you have selected Schema Synchronization when you specified the synchronization types, you can choose to enter the name of an existing topic or create a topic. If you did not select Schema Synchronization when you specified the synchronization types, you can enter only the name of an existing topic.

  4. Click Verify.

    To view the matching results, click Preview Objects after the verification succeeds. The matching results are displayed on the Final, Added, and Reduced tabs on the Matching Results page.

    After you configure matching rules to select synchronization objects, you can set filter conditions and sharding columns.

    oms14-en

    1. Choose Matching Results > Final and move the pointer over the target table object.

    2. Click Settings.

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

      • When you synchronize objects from OceanBase Database, in the Row Filters section, specify a standard SQL WHERE clause to filter data by row. Then, click Validate Syntax. For more information, see Use SQL conditions to filter data.

      • Select the sharding columns that you want to use from the Sharding Columns drop-down list. You can select multiple fields as sharding columns. This parameter is optional.

        Unless otherwise specified, select the primary key as sharding columns. If the primary keys are not load-balanced, select load-balanced fields with unique identifiers as sharding columns to avoid potential performance issues. Sharding columns can be used for the following purposes:

        • Load balancing: Threads used for sending messages can be recognized based on the sharding columns if the target table supports concurrent writes.

        • Orderliness: OMS ensures that messages are received in order if the values of the sharding columns are the same. The orderliness specifies the sequence of executing DML statements for a column.

    4. Click OK.

FAQ

  • What can I do if I do not have the required privileges?

    Pay attention to the privilege settings of the source database user. If you do not grant all required privileges to the migration user, some objects are not displayed in the frontend by OMS, and you cannot properly configure matching rules. In this case, you must add these objects to Object Exclusion Rules to prevent the data migration or synchronization task from being interrupted because OMS cannot find the target objects.

  • What can I do if DML filtering is not supported?

    If DDL synchronization is not enabled, OMS allows you to set the migration object selection mode to Match Rules. If a table created during incremental synchronization meets a matching rule, the related DDL statements will be ignored but OMS will continue to synchronize DML statements. As a result, the data migration or synchronization task will be interrupted because objects cannot be migrated or synchronized to the target database. Therefore, you must create the table in the target database or add the table to the blocklist.

次のトピック

OMSドキュメント
次へ
このページの内容
Background information
Wildcard patterns for data migration or synchronization between databases
Wildcard patterns for data migration or synchronization between a database and a message queue instance
Limitations
Considerations
Configure matching rules between databases
Sample scenarios
Configure matching rules for data migration or synchronization from a database to a message queue instance
FAQ