Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using the Compare DB feature in SIGMA STUDIO you can compare and synchronize two database schemas across two different environments, such as testing or UAT. You can compare both the Data Definition Language (DDL) and Data Manipulation Language (DML) changes between the two schemas and download the queries that pertain to the differences between the schemas.

Refer the following topics:

...

Comparing database schemas

To compare two database schemas proceed with following steps:

  1. Click Manage > Compare DB in Canvas Sigma Studio.

    Image RemovedImage Added


    The Compare DB screen appears.




    The Name field has an auto generated name by default.

  2. You can give a unique name in the Name field.

  3. Choose either mysql or oracle as DB Type in which the connection is established, by default mysql is chosen as DB Type.

  4. Choose the app in App Name field in which by default ModelHouse is chosen.

    Image RemovedImage Added

  5. Select the database connection in Old Connection field to compare.

    Image RemovedImage Added

  6. Select another database connection in New Connection field to compare with the connection in Old Connection field.

    Image RemovedImage Added


    After choosing New Connection, the tables in New Connection are displayed.

    Image RemovedImage Added

  7. Select the DDL (Data Definition Language) option to get the query for schema level differences in the two connections, e.g. changes in the table definitions.

  8. Select the DML (Data Manipulation Language) option to get the query for data level differences in tables among the two connections, e.g. changes in the functional data in the tables.

    Image RemovedImage Added

  9. You can choose the primary key for a specific table by clicking Primary / Business key column adjacent to each table and choose the column to compare the table.

    Image RemovedImage Added

  10. You can also exclude unnecessary columns before comparison by clicking Columns Exclusion column and select the columns for exclusion in each table.

    Image RemovedImage Added


    In common columns to exclude (DML) field by default some columns are already chosen.

  11. Select the columns from the drop down in the common columns to exclude (DML) field to exclude before comparison of all the tables in New Connection with Old Connection.

    Image RemovedImage Added

  12. Click Download icon to download the query required for Old Connection.

    Image RemovedImage Added

  13. Enter the existing schema name in Schema Name field for which the query needed to be inserted.


    By default, Rollback option is enabled. The Rollback option provides the queries to retain the old status of the connection.

  14. Uncheck the Rollback option to disable rollback configuration.

  15. Click Download to download the queries. The Zip file containing the SQL scripts for DDL and DML changes gets downloaded to your local Downloads folder.
    You can execute the downloaded queries on the database to get it synchronized.

  16. Click OK to the success message.

  17. Click Save icon to save the DB comparison.

    Image RemovedImage Added

  18. Click OK to the SuccessMessage.

  19. The saved Database comparison is listed in the Compare list.

...

Editing a Database Comparison

To edit existing database comparison, perform the following steps:

  1. Click Manage > Compare DB in Canvas Studio.


    The Compare DB screen appears.

    Image RemovedImage Added
  2. Click the saved database comparison in Compare list on the left to edit it.

    Image RemovedImage Added
  3. Change any of the configurations, except the Name field of the selected DB comparison.

  4. Click Save icon to save the changes.

    Image RemovedImage Added

Anchor
sg20_db2
sg20_db2

Deleting a Database Comparison

To delete existing database comparison, perform the following steps:

  1. Click Manage > Compare DB in Canvas Studio.

    Image RemovedImage Added


    The Compare DB screen appears.

    Image RemovedImage Added



  2. Hover the mouse over the saved database comparison on the left and click the delete icon to delete it.

    Image RemovedImage Added