All Products
Search
Document Center

Compare table schemas

Last Updated: Jun 08, 2019

This section describes how to compare table schemas in DMS.

Prerequisites

You have access permissions to DMS and you have logged on to the DMS console.

Procedure

  1. Log on to the DMS console.

  2. Select a MySQL database and click Log on to Database.

  3. Choose Data Operation > Table Structure Comparison on the top menu bar and enter the table schema comparison page.

    Table Structure Comparison

  4. Click Compare Table Structure and the Create Task dialog box appears. Select Select Source Database and Range such as All tables or Specified a table as needed.

    Notes

    • A source database is required to compare table schemas.

    • You can select All tables or Specified a table as objects. You need to specify the tables for comparison if you select Specified a table in the last step.

  5. Click Next to enter the next page to select target objects for comparison. You need to select an instance type. You can select Current Instance or Other Instances (or Other users).

    Notes

    • You need to specify a target database if you select Current Instance.

    • You need to specify the method of connecting the selected instances to the target instances if you select Other Instances (or Other users). The name of the database deployed in the target instance must be identical to the name of the database deployed in the current instance.

  6. After target objects are selected, click Next to enter the Configure Mappings page. Click Start Comparing after the mappings are configured.

    Notes

    • By default, the system compares table schemas with identical table names from different databases.

    • You can select Process Prefixes to match table names.

  7. Enter the Compare Table Structures page. DMS compares and reports the comparison results in real time.

  8. DMS summarizes the comparison results after the comparison is completed.

    Summarized results may contain the following information:

    • Basic information about the comparison task.

    • Information of the source object and the target object.

    • Comparison results and differences between table schemas.

  9. Click Download different DDL statements to download DDL statements generated by comparing table schemas of the source table and the target table. Perform DDL operations on the target database. Table schemas of the source table and the target table become identical.

  10. Click View Details to view the result details online.

    Notes

    • You can view comparison results of all table schemas or those that contain differences.

    • You can select different DDL operations, such as CREATE, ALTER, and DROP to filter and view table schemas differences.

  11. You can view previous comparison tasks on the Table Structure Comparison page. These tasks contain comparison configurations and table schema differences. You can also download and execute the DDL statements to have identical table schemas.