This chapter explains how to use the vericom
command line interface to run comparisons.
This chapter includes the following sections:
vericom
ToolYou 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:
Run an entire job or a specific compare pair of a job
Note:
You cannot run a group individually.Set tracing (only under guidance of an Oracle Support analyst)
For specific compare pairs, you can:
Review previous out-of-sync results
Generate out-of-sync XML from the previous run
Override the same profile and row partition settings that are possible from the web interface
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.
The vericom
program can be run by anyone who has the correct operating system permissions to run it.
On the system where the Oracle GoldenGate Veridata is installed, run the command shell of the operating system.
Navigate to the VERIDATA_DOMAIN_HOME
/veridata/bin
directory.
Use the following syntax to run the vericom
program.
vericom{.bat|.sh} required_parameter [optional_parameter]
One of the following are required; otherwise an error is returned. Enter only one option.
[-wlport port ] | -wluser user_name | -help | -helprun | [-version | -v] | [-job | -j] job |
The -wluser
specifies the WebLogic Server user name to connect to the WebLogic Server. This WebLogic Server user should have the veridataCommandLineUser
privilege to access and execute command-line operations. The user should also have the veridataAdministrator
or veridataPowerUser
privilege to successfully run jobs and to use the Veridata Import and Export utilities.
See Section 2.4, "Securing Access to Oracle GoldenGate Veridata by Defining User Roles".
If -version
, -v
, -help
, or -helprun
are specified, they take precedence over any other flag specified.
These are the optional parameters:
[ -g group -c compare_pair ] [ -nw ] [ -repair | -norepair] [ -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 ] [ -wp ]
Table 4-1 Vericom Runtime Arguments
Argument | Description |
---|---|
-wluser |
Specifies the WebLogic Server user name that authenticates and connects to the server. |
-wlport |
Specifies the WebLogic Server port number. |
-help |
Displays the |
-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 |
-g group -c compare_pair |
Specifies a group and compare pair. For
|
-nw |
Directs |
|
Specifies to whether or not to repair after a comparison completes and has confirmed out of sync data exists. |
-rP profile
|
Overrides the profile that is defined for a job. For
|
-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.
|
-rO |
A run override option. Generates an
|
-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 |
-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 |
-rC | +rC |
Controls whether or not the confirmation step (confirm OOS) is performed in the job.
These options override the default job profile and are mutually exclusive. They have no effect unless |
-rOb | -rOx | -rO2 | -rO0 |
Controls the kind of file that is produced for the out-of-sync report.
These options override the default job profile and are mutually exclusive. They have no effect if |
-rOs records
|
Limits the number of out-of-sync rows that are written to a chunk of the |
-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. |
-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 ( - 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. - 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 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
Specifies an ASCII key as the starting key value of a partition that overrides an existing source partition for an Enscribe file.
Specifies an ASCII key as the ending key value of a partition that overrides an existing source partition for an Enscribe file.
Specifies a hexadecimal key as the starting key value of a partition that overrides an existing source partition for an Enscribe file.
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 |
-rd0 | -rdN run_ID
|
Controls delta processing for a compare pair.
To use these options, you must specify a compare pair with:
|
-wp seconds
|
Waits for a job to complete. The client also polls the status of job submitted to the server at the specified interval (in seconds).
|
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 |
1 |
Invalid vericom syntax was used. For example, the following are invalid:
|
3 |
Provides more granularity for input errors that involve flags that run comparisons. For example, the following mistakes will cause this error:
In the preceding example, the
In the preceding example, the |
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. |
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.4, "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.
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.
VERIDATA_DOMAIN_HOME\veridata\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
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.
VERIDATA_DOMAIN_HOME\veridata\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
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.
VERIDATA_DOMAIN_HOME\veridata\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
'.