With Toad Edge, you can compare database objects of two databases/schemas. Based on the result, you can generate an HTML report or change scripts for both the source and the target to deploy changes immediately.
NOTE: Although possible, it is not recommended to compare two databases of different database versions (e.g. MySQL 5.6 and MySQL 5.7).
To quickly compare two databases/schemas
To configure comparison settings before performing Schema Compare
This comparison process may take a while depending on the number of objects in both databases. Once it is completed, you can see all the differences between the source and the target and perform various actions.
Schema Compare consists of three parts:
The main purpose of the grid is to resolve differences between database objects as a part of Schema Compare. You can also use other tools to filter the differences or mark them via context menu as:
There are two main types of differences:
In case you want to compare an unlinked object in source with an unlinked object in target, you will have to map them.
To map an unlinked object to any other unlinked object
Once you link objects as you wish, you can go through the differences and decide on how to resolve them.
To resolve differences between two database objects
The following table lists all possible resolution actions and their meanings:
|Action||Action description||Resolution description|
|Change target||The generated change script will change target so it matches source|
|Change source||The generated change script will change source so it matches target|
|Change both||(Different objects only) All differences between the two objects are marked as ignored. You can go through the specific differences one by one and resolve them in the Comparison Area|
|Ignore||The differences between the two objects are ignored and not included in the generated change script|
|Recompare All||Compares the source and the target again|
|Save As||Saves the comparison as a .compare file that can be loaded and displayed at any time|
|Previous Unread Change||Switches to the previous difference marked as unread ()|
|Next Unread Change||Switches to the next difference marked as unread ()|
|Export Report||Exports an HTML report detailing the detected differences|
|Generate Script for Source||Generates a change script for the source schema/database according to the resolution actions you have set. The script can be generated to clipboard, a worksheet or a file|
|Generate Script for Target||Generates a change script for the target schema/database according to the resolution actions you have set. The script can be generated to clipboard, a worksheet or a file|
|Update Objects in Database||(Repository only) Updates objects in database according to the resolution actions you have set. The drop down menu allows you to only generate a change script instead. The script can be generated to clipboard, a worksheet or a file|
|Overwrite Files on File system||(Repository only) Updates objects in file system repository according to the resolution actions you have set. The drop down menu allows you to only generate a change script instead. The script can be generated to clipboard, a worksheet or a file|
|Filter by Action||Displays only the differences that you have resolved by the selected action(s)|
|Group by||Groups the differences by the selected criteria|
|Filter||Filters the differences according to the input. It is possible to use wildcards (? and *) and regular expressions as well as filter by multiple comma separated values|
|Show/Hide Excluded Items||Shows/Hides differences marked as Excluded|
|Hide Empty Nodes||Hides object type nodes with no detected differences|
|Export Settings||Exports the Schema Compare settings and Detailed Settings which can be configured in the Outline View|
This part of Schema Compare displays specific differences between the SQL code of two given database objects. It also allows you to export the SQL code of any of the two objects in various ways and you can also deploy changes based on the actions that you have used to resolve the differences.
Comparison Area has the following tabs:
In the Script Definition tab, differences can be resolved one by one with different actions.
To resolve differences between two objects in Script Definition
Once you resolve all the differences, you will probably want to deploy the changes. This can be done in two scopes:
To deploy changes of a single object
|Deploy||Executes the generated change script in the source/target to address the differences|
|Export/Copy/Open SQL Worksheet||Exports the generated change script for source/target to a file/clipboard/Worksheet|
|Set Action||Resolves all differences between the two objects using the selected action|