Contents
View Status of the Schema Compare Result
The schema compare status in the Schema Compare Results tab is tool-dependent.
Schema Synchronization Tool | |
---|---|
Schema Compare Tool |
If you click Cancel this operation, the Schema Compare Results dialog is displayed. You can choose to cancel the current compare operation, abort and start a new compare, or continue with the existing compare operation.
Schema Compare Result
Schema Compare Result UI Differences
The Schema Compare Results tab, when launched from the Schema Compare Tool, will have the Synchronize Schema option disabled. The following screenshot highlights all the differences between both results tab. In addition to this, right-click action is not available in the Schema Compare Results tab launched via the Schema Compare Tool.
Schema Compare Results
In the Schema Compare Results tab, the objects you had selected in the Schema Synchronization Tool are grouped together according to their state. On choosing a row in the Schema Compare Results tab, the SQL Differences pane displays the DDL differences for both schemas in different color codes.
This table describes the columns in the Schema Compare Results tab.
Column | Description |
---|---|
State/Type | State is the color-coded result and Type is the object type that corresponds to the object in the Object Name column. Depending on the option you choose from the Group by drop-down, Schema Compare displays state and type in the same or separate columns. For more information, see Group by. |
Schema | The schema name corresponds to the object in the Object Name column. |
Object Name | The object name in the schema. |
Sync | The sync status for the objects. : Objects in the source and target schemas are not equal. To synchronize, select the checkbox next to each object. : Objects in the source and target schemas are identical. Identical objects cannot be synchronized. : An error occurred during schema compared as generating DDL statements for the object is not supported. : Object in the source and target schemas cannot be synchronized. You will not see this column if you have launched the Schema Compare Results tab from the Schema Compare Tool. |
Diff Count | The number of differences in the script. |
This table describes the color code and results for each state.
State | Description |
---|---|
The source and target schema objects are equal. | |
The object exists in both the source and target schemas but they are different. | |
The object exists in the source schema but not in the target schema. | |
The object exists in the target schema but not in the source schema. |
Toolbar Actions
This table describes the Toolbar actions in the Schema Compare Results tab.
Icon | Description |
Refreshes the schema compare result. | |
Allows changing data sources and adding or removing schema objects and schema options from schema compare. When you click this icon, Aqua Data Studio retrieves a snapshot of the schema synchronization dialog cached in memory and launches the Schema Synchronization Tool. See Attachment. If data cached in memory is out-of-date, then Aqua Data Studio will show an error message for DDLs that could not be generated. Therefore, we recommend performing a refresh before editing the comparison result. | |
Exports the schema compare result to HTML. You can preview the result in your default browser after Aqua Data Studio saves the file at the specified location. | |
Exports the schema compare result to Excel. | |
Compares data contained in the selected source and the target objects. You can only compare the data of a table or a view. | |
Filters schema objects. | |
Synchronizes schema objects you have selected from the schema compared result. For more information, see Schema Synchronization. The Schema Compare Results tab, when launched from the Schema Compare Tool, shows Synchronize Schema in a read-only state. On mouse-hover, a message is displayed in the tooltip, prompting you to launch schema synchronization if you want to use synchronize schemas. | |
Displays schema objects by grouping them together according to their type of differences or lists schema objects alphabetically without grouping them. For more information, see Group by. | |
Allows searching for schema objects by object name, schema name, or schema object type. Supports a case-sensitive or case-insensitive search and search by match found options. | |
Allows expanding and collapsing the result view. This action is only available when you choose Type of difference action from the Group by drop-down list. | |
Refresh
When you click , Aqua Data Studio queries the target database to retrieve a new list of schema objects based on the object types specified in the Schema Compare Results tab. The refreshed result in the Schema Compare Results tab can be categorized according to these scenarios.
Scenario | Expected Result |
---|---|
The object existed in the source schema but not in the target schema. | The object should be displayed in both the source and target schemas. |
The object existed in the target schema but not in the source schema. | The object will no longer be displayed in the Schema Compare Results tab. |
Filter
You can apply type and state filters on the compared schema objects. To apply a filter, on the Schema Compare Results toolbar, click . If you are viewing schema compare result in the Type of difference view, then you will only see Type Filter in the Schema Compare Filter window.
If you are viewing schema compare result in the No Groups view, then you will see both Type and State filters in the Schema Compare Filter window.
To apply a filter
- In the Type Filter, unselect the schema objects you want to exclude from the schema compare result.
- (Only applicable for the No Groups view) In the State Filter, you can select from these options.
- Object is different between source and target: Displays schema objects of different states.
- Object exists only in source: Displays schema objects of the source schema.
- Object exists only in target: Displays schema objects of the target schema.
- Object is identical between source and target: Displays schema objects that are equal.
- Click OK.
Group by
You can group compared schema objects by using these actions.
Type of difference
This is the default view when the Schema Compare Results tab is launched for the first time. The Schema Synchronization Tool groups the schema objects according to their state and under each state, it sorts the objects according to its type.
No Groups
The Schema Synchronization Tool does not group the schema objects. Instead, it lists the objects according to their object name. On applying a sort to the object names, the Schema Synchronization Tool sorts the schema objects alphabetically in ascending or descending order. Unlike the Type of Differences view, the Schema Synchronization Tool displays object state and object types in separate columns.
Right-Click Actions
This table describes the right-click actions for selecting schema objects for synchronization. Right-click action is not available in the Schema Compare Tool.
Right-Click Actions | Description |
---|---|
Synchronize All Items | Selects all schema objects for synchronization and launches the Schema Synchronization wizard. |
Mark Selected | Marks selected schema objects. |
Unmark Selected | Unmark selected schema objects. |
Mark All | Marks all schema objects. |
Unmark All | Unmark all schema objects. |
View SQL Script Differences
On selecting an object, you can view the source and target differences in different color codes in the SQL Differences pane. The script differences are shown in the default viewer where the source and target scripts are positioned side-by-side.
If you change the default display to the Unified viewer, then each source schema is followed by a target schema. It merges the common information and highlights the differences between the scripts.
In both viewers, you can perform these actions.
- View the total differences in the script.
- Collapse unchanged fragments. You can also use the code folding toggles (,) in the script.
- This option is only available in the Default viewer. When enabled, you can scroll both the source and target SQL Differences panes simultaneously. When disabled, you can scroll both panes individually.
- Configure the settings for the SQL Differences pane by using these options.
- Show Whitespaces: Displays an arrow when it finds a Tab and displays a period when it finds a space character in the script.
- Show Line Numbers: Displays a line number for each line in the script.
- Show Indent Guides: Displays indent levels in the script.
- Use Soft Wraps: Wraps longer lines exceeding the SQL Differences pane to the next line.
- Open help for schema compare result.
- View the previous difference.
- View the next difference.
Colored Blocks
The colored blocks in the SQL Differences pane highlight the differences in the SQL script. The Default viewer displays colored blocks on the left and right scroll bars whereas the Unified viewer displays colored blocks on the right scroll bar.
Colored Blocks | Description |
---|---|
This block of SQL statements is different between the source and the target object. | |
This block of SQL statements is present only in the source object. | |
This block of SQL statements is present only in the target object. |
If you want to change the default color codes, then on the Aqua Data Studio menu bar, click File > Options > Compare, and then choose the color code to change (Additions, Deletions, Changes).
Search and Copy SQL Script
Use the Search text box to find a specific word in the script. To search, click anywhere on the source or the target script, and then press CTRL + F (Windows/Linux) and Command + F (Mac). Schema Compare Tool highlights possible matches in yellow. You can also copy the source and target SQL scripts by using the CTRL keys; CTRL + C (Windows/Linux) and Command + C (Mac).
Export Schema Compare Result
Export to HTML
- On the Schema Compare Results toolbar, click .
- Browse and select a folder where you want to export the result. Specify the font and font size in which you want to export the result. Choose whether to open the exported file immediately after the export process completes.
- Click Export. View the result in the default browser.
Export to Excel
- On the Schema Compare Result toolbar, click .
- View the result in the Excel file. This file is saved in the Temp folder of your system.