When you “finish” the Synchronizer Wizard, it opens the Synchronize Dictionaries dialog.
This window is shared between the Import Tables and Synchronize options found in the DCT Explorer. In the Import Tables function, this window will only appear if there are conflicts with existiong table names in your dictionary. Items in conflict are marked in red.
The Synchronize Dictionaries dialog compares the two data dictionaries, item by item and lets you resolve any differences between them. It validates the proposed changes, then generates all the source code, scripts, and data definitions required to implement the changes. Finally, it gives you the opportunity to review and edit the generated source code or SQL scripts.
Overview
The Synchronize Dictionaries dialog uses a “file centric” hierarchical list to present the comparison. Beneath each file in the list, the Synchronize Dictionaries dialog nests the file's properties and components (fields, keys, relationships, and aliases). Beneath each item in the list, the Synchronize Dictionaries dialog nests that item's respective properties and components.
CLICK on the plus (+) sign to expand a list item; CLICK on the minus (-) sign to contract an item.
For every file, field, key, relationship, alias, and property in the list, the Synchronize Dictionaries dialog shows the value from each database or dictionary, plus status indicators to show whether the values are different, and how the difference is resolved (for example, ignore the difference, copy from source to target, delete item from target, not yet resolved, etc.).
The Synchronize Dictionaries dialog either dims or omits database properties the target database/dictionary does not support, depending on the settings in the Synchronizer Options dialog (see Dictionary Synchronizer Options).
Generally, follow these steps to synchronize the dictionaries:
1.Configure the Synchronize Dictionaries dialog to sort dictionary items according to your preferences'alphabetically or according to the source dictionary (use the View menu).
2.Navigate to each unmatched item and make sure each one is properly matched to the corresponding item in the other dictionary by selecting a matching option from the Synchronize menu or the popup (RIGHT-CLICK) menu. Items may be left unmatched if there is no corresponding item in the other dictionary.
3.Navigate to each difference and resolve it by selecting an option from the Synchronize menu or the popup (RIGHT-CLICK) menu.
4.Press the OK button.
Configuring the Synchronize Dictionaries Dialog
By default, the Synchronize Dictionaries dialog displays files, fields, and keys in the order specified in the Synchronizer Options dialog. You can also set default colors and other behaviors with this dialog (see Dictionary Synchronizer Options). However, you can reset the various sort orders (files, fields, keys) at any time with the View menu.
Status Indicators
The Synchronize Dictionaries dialog uses status indicators as well as color to provide information about the current synchronization process.
Status indicators are in the right-most column of the list. Status indicators include:
·32-bit only. Since all applications generated in Clarion Win32 are 32-bit, this indicator can be ignored.
·File Structure (field order) changed. This indicates a field's position has changed within the target dictionary. This indicator is especially useful when fields are sorted alphabetically and their physical order is not readily visible.
Invalid proposal below. This indicates there is an invalid proposal further down in the hierarchy. Expand the tree or use the navigation controls to find the violation.
Invalid proposal. This indicates the proposed change cannot be accepted by the target server and disables the OK button. For example, number of characters not valid for current data type.
RIGHT-CLICK on this icon then choose Display Validation Error to see an explanation of the violation.
If you have elected to resolve conflicts automatically (see Dictionary Synchronizer Options) and the conflict can be resolved automatically, then this status indicator is not set!
Color
Color indicators include:
Blue
indicates no action is applied, and the item is either different than its matching item or it has no matching item.
Black
indicates an action is applied and the resulting target item is valid, or no action is applied but none is needed because the items match and the target item is valid.
Red
indicates an action is applied and the resulting target item is not valid'the target does not support the applied property. You must resolve the invalid proposal before you can complete the synchronization. In the Import Tables function, tables in your existing dictionary that match those that you are importing will be marked in red.
Gray
The item is not supported by the target dictionary.
Navigating the Synchronizer Tree
The Synchronizer provides the following navigation aids to let you quickly identify and resolve differences between the two data dictionaries:
Go to the previous difference'automatically expands the list as required. Alternatively choose Edit Previous Difference.
Go to the next difference'automatically expands the list as required. Alternatively choose Edit bmc C6H0013.BMP} Next Difference.
Go to the previous invalid proposal'automatically expands the list as required. Alternatively choose Edit Previous Invalid Proposal.
Go to the next invalid proposal'automatically expands the list as required. Alternatively choose Edit Next Invalid Proposal.
Matching Unmatched Items
The Synchronize menu (and the RIGHT-CLICK popup menu) contains all the functions needed to match items between the two dictionaries.
Match
Associates the selected item with an unmatched item in the other dictionary. The Synchronizer moves the matched items onto the same row. RIGHT-CLICK or press ESC to abort the match.
Unmatch
This uncouples the selected items and moves them to separate rows so they can be rematched. This is for items that were matched inadvertently or which should not be matched.
Match by Name
Unmatches the selected item and rematches it by name.
Match by Order
Unmatches the selected item and rematches it by order of the source dictionary.
Match by Component
Unmatches the selected key and rematches it based on component fields.
DRAG from a source column in one row and DROP on a target column in another row to match the two items. If either item was already matched, this operation first unmatches the original match.
Relationships are matched automatically, based on the files and keys the relationship uses.
Resolving Differences Between Dictionaries
All differences between source and target dictionaries can be resolved by applying an appropriate operations to each item. The Synchronize menu (and the RIGHT-CLICK popup menu) contains all the operations needed to resolve differences between the two dictionaries.
The Synchronize Dictionaries dialog uses action indicators to provide information about the current synchronization process.
Synchronizer Actions and Action Icons
Action icons are between the source and target columns of the list. Applying an action to any item in the list affects the selected item and its children. The action applied to an item cascades to any nested items. The primary item's action icon is in full color; the cascaded action indicators are gray.
Choose Edit Undo to undo the last action.
The Synchronize Dictionaries dialog shows the proposed action for each item in the list. The action icons are in the column between the two dictionaries. Synchronizer actions and their corresponding action icons are:
Choose Edit Undo to undo the last menu selection.
See Also:
Implementing the Changes
When you have matched all relevant database items, and resolved all differences and invalid proposals in the Synchronize Dictionaries dialog, you can implement any proposed changes by pressing the OK button.
The Synchronizer creates the data conversion program, backs up the target dictionary, and generates the new target dictinary or database definition in the appropriate format'Clarion .DCT or .TXD file, Btrieve .DDF files, or SQL script.
You may execute the SQL script, or you may save the script, optionally edit it, and execute it later. The SQL script both updates the structure of the database and converts existing data to the new structure.
The Synchronizer creates back up files by renaming the original target file'Synchronizer changes the first position of the file extension to a 'B.' So *.DCT is backed up to *.BCT, *.TXD is backed up to *.BXD, *.DDF is backed up to *.BDF, etc.
Running the SQL Script
How you run the generated SQL script depends on the SQL server. See your SQL database documentation for instructions on storing and running scripts.