This topic applies to both the schema compare tool or schema synchronization tool. The steps to launch either of the tools is the same. You can launch both the tools from the Aqua Data Studio menu bar or the Aqua Data Studio Servers pane. The UI for both these tools is also the same except for the generate dependencies option that is disabled in the schema compare tool. We have added special notes and screenshots to highlight functional differences between both the schema compare and schema synchronization tools.
Contents
Launch Schema Synchronization Tool
You can launch the Schema Synchronization Tool from the Aqua Data Studio menu bar or the Aqua Data Studio Servers pane.
To launch the Schema Synchronization Tool from the Aqua Data Studio menu bar
- Connect to a database.
- On the Aqua Data Studio menu bar, click Tools > Compare Tools > Schema Synchronization.
To launch the Schema Synchronization Tool from the Aqua Data Studio Servers pane
- In the Servers pane, connect to a database, and then select the source and target schemas. The schema you select first is the source schema and the second is the target schema.
- Right-click a selected schema and then click Schema Synchronization.
Data Source
The servers you compare are known as the source and the target. The schema synchronization tool allows synchronizing the objects specified in the schemas. When schemas are synchronized, the target is updated, and the source is left unchanged.
You can compare and synchronize all schemas by selecting <All Schemas> option from the source and target drop-down lists. However, Sybase ASE Server does not allow synchronization of all schemas.
To change the source or the target servers, click Change Server for the respective server. To swap the source and target servers, click .
Schema Objects
You can select all objects or specific objects for schema comparison and synchronization. Different databases have different schema objects.
When you select a schema object, all objects of that type are listed in the Objects area. These objects are by default selected for comparison. The objects in the left pane are the source schema and on the right are the target schema. You can filter objects using the Search text box. You can also use different toolbar actions to select or clear objects from schema compare and synchronization. This table lists these actions.
Icon | Actions |
---|---|
To check all selected schema objects. | |
To clear the selected schema objects. | |
To invert the last selection. |
You can also select objects by using these right-click actions.
Right-Click Action | Description |
---|---|
Check Selected | Checks all selected schema objects. |
Uncheck Selected | Clears the selected schema objects. |
Reverse Selected | Inverts the last selection. |
Show All (Clear Filter) | Displays all objects by removing the search filter applied to the objects. This action applies to Objects area. |
Check All | Selects all schema objects. |
Uncheck All | Clears all selected schema objects. |
Select All | Highlights all the listed schemas and its object names. |
Invert Selection | Inverts the list of selected schema objects. |
Schema Options
Schema options define and alter the comparison script based on your selection.
Compare Options
Generate Dependencies
This option functions differently for both the schema compare and schema synchronization tools. The following table explains this difference.
Schema Synchronization Tool | Schema Compare Tool |
---|---|
In the schema synchronization tool, this option is selected and read-only. During schema compare, it extracts dependencies of the selected schema objects. These dependent objects from the selected source and target objects can be viewed in the default viewer of the Review Dependencies tab. | In the schema compare tool, this check box is always unselected and in the read-only mode. |
Include Object Permissions
Includes permissions granted on each object while generating the script.
Include Full Table (Indexes, Triggers)
Includes indexes and triggers applied to the tables of the source and target schemas.
Include Table Constraints
Includes table constraints in the script.
- For schema synchronization, we recommend that you select this option.
- In Sybase IQ, dbspace on a column is not extracted when a foreign key is added as a constraint on the table. Such dbspaces are ignored during schema compare.
Include Table Constraints Names
Includes names of all constraints such as; primary key, foreign key, unique, and check constraints in comparison script.
Include Table Storage
Includes storage properties applied on tables/constraints/indexes of the source and target schemas in the script.
Include Comments
Includes comments defined on a table and columns in the script.
Order Table Columns by Name
Sorts columns in both the source and target tables in alphabetical order.
Script Ignore Policies
You can use these policies for ignoring whitespaces, empty lines, and case sensitivity for the generated DDL scripts. Four of the options offered to perform case insensitive (ignore case) comparisons and the other four options perform case sensitive comparisons. The Script Ignore Policy option is used in conjunction with the Ignore case for the object definition option. For example, if you select the Ignore case for the object definition check box, then you should select a case insensitive option from the Script Ignore Policy option. The comparison engine first performs a case insensitive comparison between the source and the target object names and then compares the content of the DDL based on the selected Script Ignore Policy.
Do not ignore
When you choose this option, the comparison engine performs a case-sensitive comparison and does not trim the occurrence of whitespaces and empty lines in both the source and target scripts, to determine whether both the scripts are equal. All differences can be synchronized during schema synchronization.
Ignore case
When you choose this option, the comparison engine performs a case insensitive comparison between the source and target scripts and does not distinguish between upper and lower case letters.
Trim whitespaces
When you choose this option, the comparison engine trims the trailing and leading whitespaces in both the source and target scripts.
Trim whitespaces and ignore case
When you choose this option, the comparison engine trims the trailing and leading whitespaces in both the source and target scripts and performs a case-insensitive comparison between both the scripts.
Ignore whitespaces
When you choose this option, the comparison engine ignores all whitespaces between the source and target scripts.
Ignore whitespaces and ignore case
When you choose this option, the comparison engine performs a case-insensitive comparison and ignores the occurrence of whitespaces between the source and target scripts.
Ignore whitespaces and empty lines
When you choose this option, the comparison engine ignores all whitespaces and empty lines between the source and target scripts.
Ignore whitespaces, empty lines, ignore case
When you choose this option, the comparison engine performs a case-insensitive comparison and ignores the occurrence of whitespaces and empty lines between the source and target scripts.
Objects Alignment Options
The objects alignment options allow you to control the source and target schema alignment in the script.
Include Schema Name
This option is always read-only. Based on the following scenarios, this option is selected or unselected:
- When you select all schemas for comparison, the comparison engine selects this option.
- When you select specific schemas for comparison, the comparison engine unselects this option.
For example:
- Compare db1 schema1 to db1 schema2; the schema name is excluded from both the scripts.
- Compare db1 <all_schemas> to db1 <all_schemas>; the schema name is included in both the scripts.
Ignore case for object definition
If you want the comparison engine to perform a case-insensitive comparison of the object names without distinguishing between upper and lower case letters, then select this check box.
For example, if you have objects named AquaTable and aquatable in the source and target schemas and you select this check box, then the comparison engine considers both these objects as equal. If you do not select this check box, then comparison engine considers both these objects as different.
Script Options
Schema Synchronization uses the quote identifier set in Script Options for schema object names when it generates the deployment script.
To choose a quote identifier, on the Aqua Data Studio menu bar > File > Options > Scripts > <Database_Name> > Quote Identifier.
Recommended Options For All Databases
We recommend selecting and unselecting these options for schema synchronization.
Compare Options |
|
Script Options |
|
Script Ignore Policies |
|