Help Center/ GaussDB/ Best Practices/ Verifying Data After Migration
Updated on 2024-03-29 GMT+08:00

Verifying Data After Migration

When the task status changes to Incremental, the full synchronization is complete. You can log in to the GaussDB console and view the data migration result.

  1. Wait until the migration task status becomes Incremental.

  2. Click the task name to go to the Basic Information page.
  3. On the Synchronization Progress page, view the full synchronization result.

    As shown in the following figure, the DATATYPELIST table in the TEST_INFO database has been migrated to shard_0. Two rows were migrated successfully.

  4. Verify data consistency.

    1. Choose Synchronization Comparison > Object-Level Comparison to view the database and table migration results.

    2. Choose Synchronization Comparison > Data-Level Comparison, click Create Comparison Task, and view the migration results of the rows in the table.

  5. Connect to test_database_info in GaussDB using DAS.
  6. Run the following statement to query the full synchronization result:

    SELECT * FROM test_info.datatypelist_after;

    After the schema in Oracle is migrated, it will be used as the schema in GaussDB. Therefore, it is required to add the schema in the query statement for exact query.

    As shown in the following figure, all data types in the table were successfully migrated and the data is correct.

  7. Verify incremental synchronization.

    In the migration type of full and incremental synchronization, after the full synchronization is complete, the data that is written to the source database after the task is created can still be synchronized to the destination database until the task is complete. The following describes how to synchronize incremental data from the source database to the destination database.
    1. Use a database connection tool to connect to the source Oracle database based on its IP address.
    2. Run the following statement to insert a data record into the source database:
      Insert a data record whose ID is 1.
      insert into test_info.DATATYPELIST values(1,'Migrate-test','test1','test2','test3','test4', 666,12.321,1.123,2.123,sysdate,sysdate,sysdate,sysdate,'hw','cb','df','FF','FF','AAAYEVAAJAAAACrAAA');
      commit;
    3. Run the following statement in the destination database to query the result:
      SELECT * FROM test_info.datatypelist_after;

      As shown in the following figure, the new data inserted in the source database has been synchronized to the destination database in real time.

  8. Stop the migration task.

    After data is completely migrated to the destination database, stop the migration task.
    1. Locate the task and click Stop in the Operation column.

    2. In the display box, click Yes.

  9. After the migration is complete, test the performance.

    For details, see Performance White Paper.