Skip Headers
Oracle® GoldenGate Veridata Administrator's Guide
11g Release 2 (11.2.1.0.0)

Part Number E29092-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

10 Running Comparisons from the Command Line

This chapter explains how to use the vericom command line interface to run comparisons.

This chapter includes the following sections:


Section 10.1, "Overview of the Command Line Interface"
Section 10.2, "Running vericom"
Section 10.3, "Vericom exit statuses"
Section 10.4, "Vericom Output Examples"

10.1 Overview of the Command Line Interface

You can use the vericom tool of Oracle GoldenGate Veridata to execute certain comparison tasks from the command shell of the operating system. The vericom tool runs the Oracle GoldenGate Veridata Command Line Interface and enables you to handle these activities with automated programs.

You can:

For specific compare pairs, you can:

Comparisons also can be run from the Oracle GoldenGate Veridata Web interface. This interface provides greater control in configuring the objects to be compared and for controlling runtime parameter settings.

10.2 Running vericom

The vericom program can be run by anyone who has the correct operating system permissions to run it.

  1. On the system where the Oracle GoldenGate Veridata is installed, run the command shell of the operating system.

  2. Navigate to the Oracle GoldenGate Veridata installation directory.

  3. Use the following syntax to run the vericom program.

Syntax

vericom{.bat|.sh} required_input [optional_input]

Required Input

One of the following are required; otherwise an error is returned. Enter only one option.

-help |
-helprun |
{-version | -v} |
{-job | -j} job |
-reset_password [password]

If -version, -v, -help, or -helprun are specified, they take precedence over any other flag specified.

Optional Input

This is the optional input:

[ -g group -c compare_pair ]
[ -nw ]
[ -rP profile ]
[ -rR ]
| -rO ]
[ -rN threads ]
[ -rD seconds ]
[ -rC | +rC ]
[ -rOb | -rOx | -rO2 | -rO0 ]
[ -rOs records ]
[ -rTi ]
[ -rTc ]
[ -rTs trace_number ]
[ -pS source_partition_name |
    -pSq source_sql_predicate |
    -pSA1 source_ascii_start_key |
    -pSA2 source_ascii_end_key |
    -pSH1 source_hex_start_key |
    -pSH2 source_hex_end_key ]
[ -pT target_partition_name |
    -pTq target_sql_predicate |
    -pTA1 target_ascii_start_key |
    -pTA2 target_ascii_end_key |
    -pTH1 target_hex_start_key |
    -pTH2 target_hex_end_key ]
[ -pq sql_predicate ]
[ -rd0 | -rdN run_ID ]

Table 10-1 Vericom Runtime Arguments

Argument Description
-help

Displays the vericom syntax components and their descriptions.

-helprun

Displays run-related syntax components and their descriptions.

{-version | -v}

Displays the version of the Oracle GoldenGate Veridata command-line interface that is being used.

{-job | -j} job

Specifies the job to be run. For job, specify the name that was assigned when the job was created in Oracle GoldenGate Veridata Web.

-reset_password [password]

Requests a change to the database repository password that is stored in Oracle GoldenGate Veridata.

-g group
-c compare_pair

Specifies a group and compare pair. For group and compare_pair, specify the names that were assigned when these objects were created in Oracle GoldenGate Veridata Web.

  • If -g and -c are used, -j must also be used.

-nw 

Directs vericom not to wait for the job to finish before returning the prompt. Instead, vericom returns immediately after starting a job.

-rP profile

Overrides the profile that is defined for a job. For profile, specify the name that was assigned when the profile was created in Oracle GoldenGate Veridata Web.

  • If -rP is used, -j must be used.

-rR

A run override option. Compares only those rows that were out-of-sync in the previous run, based on the information that is stored in the out-of-sync file. The results identify which rows were brought back into synchronization by replication or another method.

  • Do not use -rR and -rO in the same run.

-rO

A run override option. Generates an OOSXML file based on the out-of-sync file from the previous run. It generates XML for every row that is in the file. You can use the XML to view the out-of-sync information in an XML editor or for other purposes.

  • -rO must be used with -j.

  • Do not use -rR and -rO in the same run.

-rN threads

Specifies the number of concurrent comparison threads to use. You can use as many threads as there are processors on the server system. This option overrides the default job profile and has no effect if a job is not run with -j or if just one comparison is run by using -j with -g and -c.

-rD seconds

Delays the confirmation step by the specified number of seconds to account for replication lag. Delaying the confirmation step reduces the number of false out-of-sync results that occur because an updated source value was not replicated fast enough. This option overrides the default job profile and has no effect if the -rR option is used.

-rC | +rC

Controls whether or not the confirmation step (confirm OOS) is performed in the job.

  • -rC skips the confirmation step. You can skip the confirmation step if activity on the source tables is stopped or if replication is not continuously updating the target table(s).

  • +rC includes the confirmation step.

These options override the default job profile and are mutually exclusive. They have no effect unless -j is used.

-rOb | -rOx | -rO2 | -rO0

Controls the kind of file that is produced for the out-of-sync report.

  • -rOb generates binary format that is compatible with the Oracle GoldenGate Veridata Web browser.

  • -rOx generates output in XML.

  • -rO2 generates both binary and XML output.

  • -rO0 suppresses out-of-sync output.

These options override the default job profile and are mutually exclusive. They have no effect if -rR is used.

-rOs records

Limits the number of out-of-sync rows that are written to a chunk of the OOSXML file. Writing the file in chunks prevents it from becoming too large for the system to manage and allows periodic archiving or purging. The current file is closed when the specified number of rows is written, and a new file is opened. This option overrides the default job profile and has no effect if -rR is used.

-rTi

Turns on tracing of Oracle GoldenGate Veridata Agent for the initial comparison step. Do not use without the guidance of an Oracle support analyst.

-rTc

Turns on tracing of Oracle GoldenGate Veridata Agent for the confirmation step. Do not use without the guidance of an Oracle support analyst.

-rTs trace_number

Turns on tracing for Oracle GoldenGate Veridata Server. trace_number is a bitmask of server execution trace flags. The higher the level, the more detailed the trace data. Do not use without the guidance of an Oracle support analyst.

-pS source_partition_name |
-pSq source_sql_predicate |
-pSA1 source_ascii_start_key |
-pSA2 source_ascii_end_key |
-pSH1 source_hex_start_key |
-pSH2 source_hex_end_key

Runs the comparison using an existing source row partition or using an override partition that is defined by partition criteria. These options are mutually exclusive. They are valid only if comparing one compare pair (-j with-g and -c) and are ignored otherwise.

-pS source_partition_name

Specifies an existing source partition that is already defined and stored in the repository. The partition name is not validated and is passed directly to Veridata Server. There will be an error if the specified partition does not exist.

-pSq source_sql_predicate

Specifies a SQL predicate that defines a partition to override an existing source partition for a SQL table. The predicate is the conditional statement that follows the WHERE keyword, for example: LAST_NAME BETWEEN "A" AND "M". Do not include the WHERE keyword. It will be added automatically at runtime.

If the predicate contains multiple words, it must be enclosed within quotes to make it a single command argument. The type of quote is dependent on the command shell or interpreter that is being used.

If the predicate contains special characters (such as $, *, < in sh/csh or %, < in Windows), they must be properly escaped for that shell or interpreter.

-pSA1 source_ascii_start_key

Specifies an ASCII key as the starting key value of a partition that overrides an existing source partition for an Enscribe file.

-pSA2 source_ascii_end_key

Specifies an ASCII key as the ending key value of a partition that overrides an existing source partition for an Enscribe file.

-pSH1 source_hex_start_key

Specifies a hexadecimal key as the starting key value of a partition that overrides an existing source partition for an Enscribe file.

-pSH2 source_hex_end_key

Specifies a hexadecimal key as the ending key value of a partition that overrides an existing source partition for an Enscribe file.

-pT target_partition_name|
-pTq target_sql_predicate |
-pTA1 target_ascii_start_key |
-pTA2 target_ascii_end_key |
-pTH1 target_hex_start_key |
-pTH2 target_hex_end_key

These options specify target partitions and have the same rules as the corresponding options that specify source partitions.

-pq sql_predicate

Specifies a SQL predicate to be used for both the source and target SQL tables, as an override to existing partitions. This option has the same rules as -pSq source_sql_predicate and-pTq target_sql_predicate.

-rd0 | -rdN run_ID

Valid for NonStop SQL/MP and Enscribe only. Controls delta processing for a compare pair.

  • -rd0 disables delta processing for this run. All rows are compared.

  • -rdN run_ID enables delta processing using a previous job run as the basis for the delta. For run_ID use the number from the Run ID line at the beginning of the job comparison report. Vericom does not validate the run ID that is supplied.

To use these options, you must specify a compare pair with:

  • -j

  • -g

  • -c


10.3 Vericom exit statuses

Vericom exits with one of the following statuses. This examples shown are for a UNIX or Linux system.

Status Description
0

The command executed successfully. If a job was run, it finished with all rows in-sync.

If -nw was specified, the exit status is 0 if the job started successfully.

1

Invalid vericom syntax was used. For example, the following are invalid:

vericom.sh -helptun (Typographical error.)

vericom.sh -j -g group1 (The name of the job is missing.)

2

Vericom could not find connection information by looking in veridata.loc or veridata.cfg, and connection parameters were not specified with command arguments.

3

Provides more granularity for input errors that involve flags that run comparisons. For example, the following mistakes will cause this error:

vericom.sh –j job1 –c address=address

In the preceding example, the -g group input is missing. It is required with -j if -c is used.

vericom.sh –j job1 –g group1 –rd0

In the preceding example, the -rd0 flag requires –c because delta processing applies at the compare pair level.

4

The job ran successfully, but there were rows that had a comparison status of something other than in-sync.

5

There was a communication error with Oracle GoldenGate Veridata Server.


10.4 Vericom Output Examples

To view the results of a comparison that is run with vericom, you can use Oracle GoldenGate Veridata Web to view the comparison report (see Section 1.3, "Viewing Comparison Results"), and you can view the output that is returned by vericom to the terminal. If a run finishes successfully, statistics for the job are displayed.

Example 1   

The following example shows a run on a Windows system of TestJob without specifying -w. The process exits with status 0, and finished job statistics are not displayed.

C:\veridata\server\bin>vericom.bat -j TestJob
Connecting to: localhost:9177
Run ID: (2256, 0, 0)
C:\veridata\server\bin> if errorlevel 0 echo EXITED 0 STATUS
EXITED 0 STATUS
Example 2   

The following example shows a run of TestJob with-w specified. The process exits with status 4 because one of the compare pairs had a validation error. Finished job statistics are displayed.

C:\veridata\server\bin>vericom.bat -j TestJob -w
Connecting to: localhost:9177
Run ID: (2257, 0, 0)
Job Start Time: 2008-03-21 22:48:05
Job Stop Time: 2008-03-21 22:48:20
Job Report Filename: C:\testjunit\rpt\TestJob\00002257\TestJob.rpt
Number of Compare Pairs: 3
Number of Compare Pairs With Errors: 1
Number of Compare Pairs With OOS: 1
Number of Compare Pairs With No OOS: 1
Number of Compare Pairs Cancelled: 0
Job Completion Status: WITH ERRORS
C:\veridata\server\bin> if errorlevel 4 echo EXITED 4 STATUS
EXITED 4 STATUS
Example 3   

The following example shows a run of compare pair TABLE9=TABLE9 in job TestJob with -w specified. The process exits with status 0 because the tables are in-sync. Finished job statistics are displayed.

C:\veridata\server\bin>vericom.bat -j TestJob -g TestGroup -c TABLE9=TABLE9 -w
Connecting to: localhost:9177
Run ID: (2258, 0, 0)
Job Start Time: 2008-03-21 22:51:08
Job Stop Time: 2008-03-21 22:51:11
Job Report Filename: C:\veridata\data\rpt\TestJob\00002258\TestJob.rpt
Number of Compare Pairs: 1
Number of Compare Pairs With Errors: 0
Number of Compare Pairs With OOS: 0
Number of Compare Pairs With No OOS: 1
Number of Compare Pairs Cancelled: 0
Compare Pair Report Filename: C:\veridata\data\rpt\TestJob\00002258\TestGroup\CP_ TABLE9=TABLE9.rpt
Number of Rows Compared: 21
Number of Rows In Sync: 21
Number of Rows With Errors: 0
Number of Rows Out Of Sync: 0
Number of Inserts Out Of Sync: 0
Number of Deletes Out Of Sync: 0
Number of Updates Out Of Sync: 0
Compare Pair OOSXML Directory: C:\veridata\data\oosxml\TestJob\00002258\TestGroup
Compare Pair OOSXML Filename: 
Job Completion Status: IN SYNC
C:\veridata\server\bin> if errorlevel 0 echo EXITED 0 STATUS
EXITED 0 STATUS

On UNIX systems, the exit status of the previously executed command is in the special variable '$?' if you are using SH or KSH shells. If you are using the CSH shell, the exit status of the previously executed command is in the special variable '$status'.