Compare and Synchronize SQL Azure to/from SQL Server using Optillect Data Compare SQL


Optillect Data Compare SQL is a new tool which compares and synchronizes data in tables or views for SQL Azure to SQL Server and vice versa.

Key features are

1. Support all version of SQL Server (2000 to Denali and SQL Azure)

2. Support for filtering data

3. Command Line interface available for automation

4. Lightweight, easy to install and use

5. Low price when compared to industry standard competitors. Currently priced as $195, if you upgrade from competitor product, you can buy it for $39

For full list of features visit http://optillect.com/products/datacomparesql/features.html

Let us see How to use this tool to Synchronize data from SQL Server to SQL Azure

After downloading the tool, double click the setup to run

image

Click “Next” to proceed

image

Select “I accept the agreement” and click “Next” to proceed

image

Click “Next” to proceed

image

If required, change Shortcut folder or Click “Next” to proceed

image

Click “Next” to proceed

image

Click “Install” to confirm and proceed

image

image

Once installation is completed, select “Launch Optillect Data Compare SQL” and click “Finish” to complete installation and start the program.

By default a new Data Compare project will be created, with the following options

image

Based on your Sync direction select Azure or SQL Database for Source and Target.

For SQL Server Database, Specify Server Name, authentication and then select Database

For SQL Azure Database, specify Server Name, select Host, specify username and password credential and then select Database.

Once Source and Target database is defined, click “Next”

image

In options screen, you can specify How to compare the data such as Object Name Matching, Exclusion Criteria, etc..

Please refer to the following screen for further Comparison options

image

If you have a bigger database, I highly recommend you to use “Compress data cache” option and also to specify the Data cache directory to a drive where there is plenty of space available according to your database size.

Based on your computer CPU configuration, you can increase the comparison threads as well

After completing the options configuration, click “Next” to proceed

image

In this screen, by default it maps the schema by its name, if you want to customize it, you can reset the mapping or use Unmap option to unmap it and then select the source and target schema and map it

Once Schema mapping is completed, click “Next” to proceed

image

In Object Mapping screen, by default you will see all objects mapped automatically by its name, you can unmap them and change the mapping based on your requirement

You can click on the Column Pairs link to customize the mapping at column level, for ex. to exclude a field from data compare

image

You can filter the data for comparison, using “WHERE clause…” option, you can directly enter the SQL Where clause Criteria and click on “Validate” to verify the criteria works or not

image

Once Where Clause is defined, click “Ok” to proceed and then click “Compare Now” to start the comparison process

image

Once the data comparison is completed, the above results will be displayed. You can see the data in the results pane

image

You can generate the Data comparison report using “Build Report…” option from toolbar, you can generate report in 3 formats, HTML, XML or CSV.

Please see the below sample HTML report

image

To synchronize the data, click on “Synchronization Wizard…”, to save the script for reference, select “Save synchronization to file” option

image

Click “Next” to specify the options

You can specify whether to create a backup of the target database before update the data and also specify what transaction isolation level to be used.

image

After specifying required options, click “Next” to review the action plan

image

In Action Preview, you can see the steps of data synchronization process, once review click “Synchronize Now!” to proceed

image

image

Once Synchronization is complete, you will see the above screen, with time elapsed, you can use “Recompare databases” option to verify if the data comparison worked without any issues.

If you want to automate this synchronization process, you can use “Save BAT file with CMD line” option from File Menu,

image

Using this option will generate a batch file looking similar to below, using this batch file, you can schedule a windows scheduler task to run the sync on your specific required schedules.

image

Advantages:

1. Easy to use

2. Lightweight

3. Faster

4. Price is comparable cheaper than industry standard competitors

I hope you all find this information useful !!!

Advertisement

Author: Arunraj

I am a Microsoft Certified Technology Specialist (Database Developer). I work on SQL Server programming since SQL Server 7.0 specializes in SQL Server Programming and Performance Tuning and has 14 years of hands-on experience. I hold a Master Degree in Computer Applications. I am also part of NJSQL User Group and Northern New Jersey .Net User Group.

One thought on “Compare and Synchronize SQL Azure to/from SQL Server using Optillect Data Compare SQL”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: