Skip to main content

Schema comparison

NineData database comparison function supports schema comparison, that is, metadata comparison, which is used to compare whether the definitions of objects in two databases are consistent. This article describes how to perform schema comparisons.

Prerequisite

Steps

  1. Log in to NineData console .

  2. In the left navigation bar, click Database Comparison > Schema Comparison .

  3. In the upper right corner of the Schema Comparison page, click Create Schema Comparison .

  4. On the Source & Target tab, configure according to the following table, and click Next .

    Parameters
    Description
    NameEnter the name of the comparison task. For the convenience of subsequent search and management, please try to use a meaningful name. Up to 64 characters are supported.
    SourceCompare the source data source of the task, and the system will compare based on the structure of the data source.
    TargetThe object data source for the comparison task.
    FrequencySelect how often the comparison is performed.
    • One-time : Perform the comparison task only once. User can manually perform the comparison task multiple times.
    • Periodic : Periodically perform a compare task.
    Periodic (Periodic comparison only)Choose how often to compare, user can choose any one or more days from Monday to Sunday, or check Every day to compare daily.
    Time Zone (Periodic comparison only)Select the time zone according to the actual business situation. This parameter affects the time displayed in the comparison task.
    Launch Time ( Periodic comparison only)Select the time to launch the comparison task, from 00:00 to 23:59 . User can also click Now to select the current time as the start time.
  5. On the Objects tab, select the content to be compared and click Next . Both Full Instance and Customized Object are supported .

  • Full Instance : Select all databases and objects in the source instance.
  • Customized Object : Customize the database and objects to be compared. In the Source list on the left, select the databases and objects to be compared, and click > add to Target list.
  1. On the tab, configure the mapping relationship between the source and target databases and object names, and click Save and Pre-Check .

    tip

    If the database and object names in the target end are inconsistent with those in the source end, user should configure the mapping logic.

  2. On the Pre-check tab, wait for the system to complete the pre-check. After the pre-check passes, click Launch .

    tip
    • If the pre-check fails, user need to click the Details in the Actions column to the right of the target check item to correct the failure, and then perform the pre-check again.
  • Warnings can be repaired or ignored according to specific circumstances.

    :::

  1. On the Launch tab, a message is displayed indicating that Launch Successfully . You can do the following:

    • If it is a Periodic comparison , click Compare to execute a comparison task immediately.
    • Click View Details to view the execution of the comparison task.
    • Click Back to List to return to the Schema Comparison list.

View comparison results

  1. Log in to the NineData console .

  2. In the left navigation bar, click Database Comparison > Schema Comparison .

  3. On the Schema Comparison page, click the Task ID. The page description is as follows.interface

    Serial number
    Function
    Description
    1Task statusCompare the current state of the task.
    2Configure alertsAfter configuring alerts, the system notifies the user in case of a task failure.
    3Compare nowOnly in-progress tasks are displayed, and a comparison task begins immediately.
    4More
    • Pause : Pause the task, only applicable to the task whose status is Running.
    • Edit : Edit the configuration information of the task.
    • Terminate : End the task.
    • Delete : Delete the task. The action is irreversible, please operate with caution.
    5Filter itemsFilter the comparison results by task status , task results , and table names.
    6LogRecords all logs during the execution of the comparison task, and supports quick filtering and positioning of target logs by log type , log generation time , keywords and other items.
    7RefreshGet the latest status of comparison tasks.
    8List of comparison resultsShow the results of the structural comparison between the source and destination.
    • Click the details in the Actions column on the right side of the comparison list : view the comparison details of the table definition DDL statements of the source and target.
    • Click the sqlin the Actions column on the right side of the comparison list (displayed in case of inconsistency): generate change SQL, user can apply SQL on target instance for execution, and correct the inconsistent content.
    9History of comparison task resultsClick to view a list of all comparison results. Click on a target list item to switch to the details of that comparison result.