Comparing Data in User Defined SQL Statements


When you connect to both comparing SQL Servers, Select File | Data Compare/Config from the main menu will display the Data Compare | Data Compare Configure Dialog as shown in Figure 1. This dialog will serve two purposes:

 

1. Defining Data by entering SQL scripts.  You can define comparing data by using the entered SQL script;

2. Configuring Data Comparison scripts.  You can save the configuration to a file and use the configuration file for data comparison on command line.

 

 

Figure 1 Data Compare | Data Compare Configure Dialog

 

 

If you are defining a new set of data for comparison, you can enter SQL scripts in both SQL editors. If you open a configuration file that was saved previously, the predefined SQL statements should be loaded in the two SQL editors.

 

You can configure SQL script on one side of the editor. By clicking "Copy -->" or "<-- Copy" button will copy the SQL script to the other side of the SQL editor. To check the SQL script syntax, clicking the Check Syntax button the SQL script syntax will be checked against corresponding connected SQL Server.

 

By default, all rows of comparing results will be displayed. If you want to display different data rows only, you can select the check box Show Differences Only.

 

For running on the command line, the comparing result is sent to a file instead of showing on the screen.  Please make sure the check box Show Comparing Result in File? is selected and a proper file name is entered. Then, click Save As button to save the configuration to a file.

 

If you want to compare data now, just click the Compare button. As you know, comparing data records is a very high resource usage process of your computer. The memory usage of data comparing depends on number of records and size of each record. If you experience slow process of the data comparison, please limit the number of records that you wish to compare.

 

 

Figure 2  Record Difference Dialog

 

After data record comparing process is finished, you will see Record Difference Dialog as shown in Figure 4.  Total difference of the comparison is listed at the bottom of the screen. For records that detected different from the comparing opponents are listed in different background colors.  The legend of the colors is listed at the status bar of the screen too.

 


SQLDBCompare, Copyright © 2003-2007, Best SoftTool, Incorporated