The Compare Databases wizard provides an easy way to compare two or more databases, either live or from a snapshot. Based on your specifications, the wizard generates a script that you can save to a folder on your computer or run immediately to synchronize the two databases.
This feature is only available with the DB Admin Module, which is included in several Toad Editions or can be purchased separately.
To run the wizard
- (If comparing from databases) Connect to the source and target databases that you want to compare.
-
Do either of the following:
- From the Toad menu, select Database | Compare | Databases.
- On the DB Misc tab of the Automation Designer, double-click
(Compare Databases) to add the action to your app, then double-click the action to open the Properties dialog.
-
Under Source, select Database or Snapshot, then select the connection or snapshot as appropriate.
- Click
.
- In the Add Schema dialog, select either Database or Snapshot, then select the target database or snapshot file as appropriate.
- Click OK to add the selection to the Connection/File list.
- To add another target, click
then repeat the steps.
- Click Next.
- Select options from the Choose Options window. See Choose Options
- Click Compare to run the comparison.
- See Using the Comparison Results.
Choose Options
Note: You can right-click to select Check All or Uncheck All and Expand All or Collapse All if needed.
|
Option |
Description |
|---|---|
|
Compare |
Under Object types and Database settings, select the objects and settings that you want to compare and, if applicable, synchronize. Unchecked items are ignored. Note: You can right-click to select Check All or Uncheck All and Expand All or Collapse All if needed. |
|
Output |
Output is optional and can be saved later, but for multiple comparisons it is more convenient to configure output than to save the files later.
|
|
Options |
Select additional comparison criteria for objects that you are comparing and that you want in the synchronization script. Note: If you plan to run the synchronization script and you selected User/Role privileges under Object types, make certain Don't synchronize passwords for users and roles remains selected if you do not want the target passwords to be overwritten by the source passwords. |
|
Filters |
Further refines the object selection. Maximum number of differences: Stops the comparison if the specified number of differences between databases is found. Object Set: Select this option to filter the comparison to a set of specific objects.
If no objects of a particular type are listed here, then all objects of that type will be compared. |
Using the Comparison Results
When the initial comparison is complete, the bottom half of the window shows the results for the selected pair of schemas on a series of tabs.
- Right-click on an object on the Details tab to view additional options. Tip: Right-click an object in the list, then select Show sync script for selected items to view the DDL that is in the script for the selected object.
- To exclude an object from the sync script, uncheck it on the Details tab.
- You can save the selected objects to a file by clicking
on the toolbar of the Details tab.
- Use the Summary tab to view the differences in the two databases, grouped by objects that were compared. You can save this as html by clicking
on the toolbar.
- Use the Sync Script tab to view the DDL changes that will be made to the target database when you run the script. You can save this script to a variety of file types by clicking
on the toolbar or by right-clicking within in the tab and then selecting Save. You can also print the script from the right-click menu.