StarQuest Technical Documents

SQDR: Using TargetChecker

Last Update: 14 August 2019
Product: SQDR & SQDR Plus
Version: 4.0 and later
Article ID: SQV00PL046

Abstract

This technical document describes the use of TargetChecker, a Visual Basic script to verify that the number of rows in the source table match the number of rows in the destination table.

Solution

Targetchecker.vbs is a Visual Basic script which can be run from a command prompt to obtain row count statistics for source and destination tables of incremental subscriptions.  The script is used to verify that the number of rows in the source table match the number of rows in the destination table. For best results, the script should be run when database activity is at a minimum. 

Targetchecker should be run multiple times when the Diff value does not equal zero (0). A Diff value of zero (0) usually indicates that row counts are equal between source and destination tables. A consistent Diff value other than zero after multiple runs of Targetchecker usually indicates a discrepancy in row counts i.e. the row counts are NOT equal. However, database activity must be completely quiesced in order to receive the most reliable TargetChecker results.

 

Syntax

From an Administrator command prompt:

C:\Program Files\StarQuest\SQDR> cscript targetchecker.vbs <group_name> <subscription_name>

e.g.
cscript targetchecker.vbs MyGroup MySubscription

Use % as a wildcard. Examples:

Check all subscriptions in MyGroup:
cscript targetchecker.vbs MyGroup % 

Check all subscriptions in all groups:
cscript targetchecker.vbs % %   

Check all subscriptions where subscription name ends in "tablex":
cscript targetchecker.vbs % %tablex

Note: group and subscription names containing space characters must be enclosed in double-quotes.

Example of Output


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.