Updated on 2025-03-04 GMT+08:00

Verification Tasks

Scenarios

This section describes how to compare verification items to check if there are any differences between source and destination databases. To minimize the impact on services and shorten the service interruption duration, the following comparison methods are provided:

  • Object-level comparison: It compares databases, tables, and indexes.
  • Data-level row comparison: It compares the number of rows in the tables to be synchronized. This comparison method is recommended because it is fast.
  • Data-level static value comparison: It checks whether data in the synchronized table is consistent. The time required for comparison depends on the amount of data in the table.

Value comparison and row comparison cannot be performed at the same time.

Value comparison and object-level comparison cannot be performed at the same time.

Prerequisites

  • A verification task has been started.

Comparison Description

Table 1 Data verification capability of each data flow

Synchronization Direction

Data Flow

Object-Level Comparison

Row Comparison

Account-Level Comparison

Static Value Comparison

To the cloud

MySQL -> MySQL

Supported

Supported

Not supported

Supported

To the cloud

MySQL -> PostgreSQL

Supported

Supported

Not supported

Not supported

To the cloud

MySQL -> GaussDB Distributed

Supported

Supported

Not supported

Supported

To the cloud

MySQL -> GaussDB Centralized

Supported

Supported

Not supported

Supported

To the cloud

MySQL -> TaurusDB

Supported

Supported

Not supported

Supported

To the cloud

PostgreSQL -> PostgreSQL

Supported

Supported

Supported

Supported

To the cloud

PostgreSQL -> GaussDB Centralized

Supported

Supported

Not supported

Supported

To the cloud

PostgreSQL -> GaussDB Distributed

Supported

Supported

Not supported

Supported

To the cloud

DDM -> MySQL

Supported

Supported

Not supported

Not supported

To the cloud

DDM -> DDM

Supported

Supported

Not supported

Not supported

To the cloud

Oracle -> MySQL

Supported

Supported

Not supported

Supported

To the cloud

Oracle -> TaurusDB

Supported

Supported

Not supported

Supported

To the cloud

Oracle -> GaussDB Centralized

Supported

Supported

Not supported

Supported

To the cloud

Oracle -> GaussDB Distributed

Supported

Supported

Not supported

Supported

To the cloud

Oracle -> DDM

Supported

Supported

Not supported

Not supported

To the cloud

Oracle > PostgreSQL

Supported

Supported

Not supported

Not supported

To the cloud

DB2 for LUW -> GaussDB Centralized

Supported

Supported

Not supported

Supported

To the cloud

DB2 for LUW -> GaussDB Distributed

Supported

Supported

Not supported

Supported

To the cloud

TiDB -> TaurusDB

Supported

Supported

Not supported

Not supported

To the cloud

Microsoft SQL Server -> GaussDB(DWS)

Supported

Supported

Not supported

Not supported

To the cloud

Microsoft SQL Server -> GaussDB Centralized

Supported

Supported

Not supported

Supported

To the cloud

Microsoft SQL Server -> GaussDB Distributed

Supported

Supported

Not supported

Supported

To the cloud

Microsoft SQL Server -> Microsoft SQL Server

Supported

Supported

Not supported

Not supported

To the cloud

MongoDB -> DDS

Supported

Supported

Not supported

Supported

To the cloud

MariaDB -> MariaDB

Supported

Supported

Not supported

Supported

To the cloud

MariaDB -> MySQL

Supported

Supported

Not supported

Supported

To the cloud

MariaDB -> TaurusDB

Supported

Supported

Not supported

Supported

To the cloud

TaurusDB -> TaurusDB

Supported

Supported

Not supported

Supported

To the cloud

Dynamo -> GeminiDB Dynamo

Supported

Not supported

Not supported

Not supported

Out of the cloud

MySQL -> MySQL

Supported

Supported

Not supported

Supported

Out of the cloud

MySQL -> CSS/ES

Supported

Supported

Not supported

Not supported

Out of the cloud

DDM -> MySQL

Supported

Supported

Not supported

Not supported

Out of the cloud

DDM -> Oracle

Supported

Supported

Not supported

Not supported

Out of the cloud

DDS -> MongoDB

Supported

Supported

Not supported

Supported

Out of the cloud

PostgreSQL -> PostgreSQL

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Centralized -> MySQL

Supported

Supported

Not supported

Not supported

Out of the cloud

GaussDB Centralized -> Oracle

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Centralized -> GaussDB Distributed

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Centralized -> GaussDB Centralized

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Centralized -> Informix

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Centralized -> PostgreSQL

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Distributed -> MySQL

Supported

Supported

Not supported

Not supported

Out of the cloud

GaussDB Distributed -> Oracle

Supported

Supported

Not supported

Supported

Out of the cloud

GaussDB Distributed -> GaussDB Distributed

Supported

Supported

Not supported

Not supported

Out of the cloud

GaussDB Distributed -> GaussDB Centralized

Supported

Supported

Not supported

Not supported

Out of the cloud

GaussDB Distributed -> PostgreSQL

Supported

Supported

Not supported

Supported

Out of the cloud

TaurusDB -> MySQL

Supported

Supported

Not supported

Supported

Out of the cloud

TaurusDB -> CSS/ES

Supported

Supported

Not supported

Not supported

Out of the cloud

TaurusDB -> Oracle

Supported

Supported

Not supported

Not supported

Out of the cloud

MariaDB -> MariaDB

Supported

Supported

Not supported

Supported

Self-built to self-built

Oracle -> GaussDB Centralized

Supported

Supported

Not supported

Supported

Self-built to self-built

Oracle -> GaussDB Distributed

Supported

Supported

Not supported

Supported

Self-built to self-built

MySQL -> CSS/ES

Supported

Supported

Not supported

Not supported

Self-built to self-built

MySQL -> GaussDB Centralized

Supported

Supported

Not supported

Not supported

Self-built to self-built

GaussDB Centralized -> Oracle

Supported

Supported

Not supported

Supported

Self-built to self-built

GaussDB Centralized -> GaussDB Centralized

Supported

Supported

Not supported

Not supported

Self-built to self-built

GaussDB Distributed -> Oracle

Supported

Supported

Not supported

Supported

Self-built to self-built

GaussDB Distributed -> GaussDB Distributed

Supported

Supported

Not supported

Not supported

Self-built to self-built

DB2 for LUW -> GaussDB Centralized

Supported

Supported

Not supported

Supported

Self-built to self-built

DB2 for LUW -> GaussDB Distributed

Supported

Supported

Not supported

Supported

Data comparison can clearly show whether data in the source database is different from that in the destination database. Currently, the following data types do not support value comparison, which will be skipped.

Table 2 Data types that do not support value comparison

Source Database

Data Type

MySQL

TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT

GaussDB

TEXT, CLOB, BLOB, BYTEA, INTERVAL DAY TO SECOND, and INTERVAL

Oracle

BLOB, NCLOB, CLOB, LONG RAW, LONG, INTERVAL DAY TO SECOND, INTERVAL YEAR TO MONTH, UROWID, BFILE, XMLTYPE, and SDO_GEOMETRY

Microsoft SQL Server

TEXT, NTEXT, IMAGE, BINARY, VARBINARY, HIERARCHYID, XML, and TIMESTAMP

DB2 for LUW

CLOB, DBCLOB, BLOB, BINARY, VARBINARY, and TEXT

PostgreSQL

lob, text, byte, interval

DRS does not support value comparison if primary key columns contain the following data types, which will be grouped into a specified table that does not support comparison.

Table 3 Primary key data types that do not support value comparison

Source Database

Data Type

MySQL

TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, FLOAT, TIMESTAMP, DATE, and DATETIME

GaussDB

TEXT, CLOB, BLOB, BYTEA, INTERVAL DAY TO SECOND, INTERVAL, REAL, DOUBLE PRECISION, BOOL, TIME, TIMETZ, TIMESTAMP, TIMESTAMPTZ, and DATE

Oracle

BLOB, NCLOB, CLOB, LONG RAW, LONG, INTERVAL DAY TO SECOND, INTERVAL YEAR TO MONTH, UROWID, BFILE, XMLTYPE, SDO_GEOMETRY, BINARY_FLOAT, BINARY_DOUBLE, FLOAT, RAW, TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE, and DATE

Microsoft SQL Server

FLOAT, REAL, DATE, DATETIME, DATETIME2, DATETIMEOFFSET, TIME, TIMESTAMP, TEXT, NTEXT, IMAGE, BINARY, and VARBINARY

DB2 for LUW

CLOB, DBCLOB, BLOB, BINARY, VARBINARY, and TEXT

Creating a Comparison Task

  1. On the Data Verification Management page, click the target task in the Task Name/ID column.
  2. Click the Verification Tasks tab.
  3. Select objects to be compared and create a comparison task.

    • On the Object-Level Comparison tab page, click Compare. Wait for a while and click to check whether Consistent is displayed in the Result column for all comparison items. You can locate a comparison item and click View Details in the Operation column.
      Figure 1 Object-level comparison

    • To create a data-level comparison task, click Create Comparison Task on the Data-Level Comparison tab page, specify Comparison Type and Object in the displayed dialog box, and click OK.
      Figure 2 Creating a data-level comparison task

      • Row: Check whether the number of rows in the source table is the same as that in the destination table.
      • Value: Check whether the source table has same data as the destination table.

        Static: This comparison method is applicable at off-peak hours when no data changes.

      • Object: Select objects to be compared.
    • To create a comparison task when specified data needs to be filtered out, click the Data-Level Comparison tab, click Create Comparison Task, set Comparison Type and Comparison Method, and Enable Filter Data.
      Figure 3 Creating a comparison task when specified data needs to be filtered out

      Select objects and click Next. Select tables, enter filtering criteria, and click Verify.

      Figure 4 Selecting objects

      After the verification is complete, click Generate Processing Rule and click Yes to create a comparison task.

      Figure 5 Processing Rule

  4. After the comparison creation task is submitted, the Data-Level Comparison tab is displayed. Click to refresh the list and view the comparison result of the specified comparison type.

    Figure 6 Data-level comparison

    • To view row or value comparison details, click View Results.
      Figure 7 Data-level comparison details

    • Click Export Report to export the comparison report.
    • Click Download to download the exported report to your local PC.
    • You can also view comparison details of canceled comparison tasks.
    • The exported report is retained for 24 hours. Download it to your local PC as soon as possible.