Article Options
Premium Sponsor
Premium Sponsor

 »  Home  »  Reviews  »  Product Showcase  »  SQL Delta : Product Review  »  Structure Comparisons
SQL Delta : Product Review
by David Jeavons | Published  03/15/2006 | Product Showcase | Rating:
Structure Comparisons

Once you have specified your connection options, simply press the Compare Structures button and you will be presented with all objects from both databases and the differences (if any) between them. This is where SQL Delta really shines. The output is presented in two panes, one above the other.

 

 

The top pane shows all objects that have been chosen for comparison and gives you a status for each (identical, missing, additional and different). The bottom pane shows more detailed information for the selected object in the top pane. For example, I compared the Northwind database against a new database (without any objects) and the structure comparison showed all objects that were missing from the target database.

Looking at the detailed view of the Employees table shows 9 tabs each pertaining to a specific area of the table. The first tab displays a summary showing how many columns, keys (primary and foreign); permissions etc. are missing or different. Then each tab thereafter goes into more detail. The Columns tab for example shows two grids, one for the source and the other for the target and details each column that is missing along with their data types and attributes.

The last tab called Script shows the SQL script that is required for both the source and target databases to build the Employees table, create indexes and grant permissions. This also shows the differences between the two scripts. For example, if the only difference was a missing index then the source script would show the creation of the index while the target script would not.

From the list of objects that are not identical, SQL Delta automatically assigns an action against each object. These actions determine what should happen to the object and usually refer to the target database. So still comparing the Northwind database to my blank database, SQL Delta has assigned an action of “Create on (local).myDatabase”, however, you can change the action for individual objects by selecting an appropriate entry from the Action menu.

So if you wanted to drop the Employees table from the Northwind database then simply change the Action to “Drop from (local).Northwind”. When you have gone through all of the differences you then simply press the Script button and SQL Delta will present you with a dialog showing the list of objects that will be acted upon and the script for each object. At this point you can then decide whether you want to save the script for use later or run it immediately. I chose to run the script immediately and was presented with a warning that I should backup my databases before continuing. Of course, I heeded the warning and pressed Ok straight away, but in all seriousness, you should of course back up any important data before running the script. SQL Delta does not have any options for backing up databases due to the differences in organisations on how they manage their backups so it is left to the user to perform these tasks themselves.

Once the script was run, the comparison window was updated and all objects showed as being identical. Being the sceptic that I am, I opened Enterprise manager and confirmed this for myself and was pleasantly surprised.

 

Sponsored Links