Previous Topic

Next Topic

Book Contents

Book Index

Two-Pass Compare

Two Pass Compare can be specified on the More Options tab:

Two-Pass Compare can only be used when you are comparing Tables, and not when you are comparing Queries.

Introduction

Two-Pass compare was developed to deal with two problems that can happen with the Data Compare:

How it works

Two pass compare works as follows:

AQT will wait the Delay period between the first and second phases. If you are running the compare against an operational system, you should set the delay period to a time greater than the largest commit-interval of your database processes.

If you are having problems with the collation order problem, then the re-compare will correctly compare the rows that were not compared successfully due to the collation problem.

Database Access

The first and second phases work quite differently in the way they access the data:

Consequently, we only recommend using the Two-Pass Compare if you expect relatively few rows to be different.

Multi-Pass Compare

When running the Data Compare in batch mode, you have more flexibility about how the two-pass compare is run, including using multiple passes.

Normal two-pass compare

This can be done by specifying, on the --datacomp control statement, the following additional parameters:

twopass=y,gendiff=y,diff_file=<filename>

Alternatively

A two-pass compare can also be run by running the compare twice. The first time by specifying:

gendiff=y,diff_file=<filename>

and the second time by specifying

diff_file_in=<filename>

Running the compare as two steps like this gives you more flexibility:

Multiple passes

The above idea can be extended to run the compare in multiple passes. To do three passes:

The interesting point here is the second pass. This does second-pass processing PLUS it generates a difference file of the differences that still remain at the end of this compare pass. This second difference file is then input to the third step.

Note that <filename> and <filename2> can be specified as the same file. This will not cause a problem within AQT.

Layout of the Difference File

If you wish to view / edit the difference file, it is in the following format:

row-key;grid1-rowid;grid2-rowid;description;

where

If you are running AQT batch mode, and are adding or editing values in the difference file, you only need to specify a value for row-key.

Advanced Query Tool
https://www.querytool.com
© 2023 Cardett Associates Ltd. All rights reserved.