Installing and configuring the data validator v7
When you install the Replication Server product, the components for the Data Validator are installed as well. Also, when you uninstall the Replication Server product, the Data Validator components are uninstalled.
The following components that you use to run the Data Validator are installed when you install the Replication Server product.
|XDB_HOME/etc||Data Validator Properties file|
|XDB_HOME/bin||Data Validator execution script|
|XDB_HOME\bin||Data Validator execution script|
XDB_HOME is the directory where Replication Server is installed. This might not be the same as the Postgres home directory depending on how Replication Server is installed.
If you plan to use an Oracle database as the source or target database, download the Oracle JDBC driver and place it in the
datavalidator.propertiesfile located in the
XDB_HOME/etcdirectory and specify the connection information for the source and target databases you want to compare.
You can override any of these parameters with an option when you invoke the Data Validator script. See Performing data validation for information on invoking the Data Validator.
The following are the parameters in the
Type of the source database. Values can be enterprisedb, oracle, sqlserver, sybase, or mysql.
IP address or server name of the host running the database server of the source database
Port number on which the database server of the source database listens for requests
Database name of the source database
Database user name of the source database
Unencrypted password of the source database user
Type of the target database. Values can be enterprisedb or oracle.
IP address or server name of the host running the database server of the target database
Port number on which the database server of the target database listens for requests
Database name of the target database
Database user name of the target database
Unencrypted password of the target database user
The following is the initial content of the
datavalidator.propertiesfile after installation:
Before invoking the Data Validator for the first time, determine the location of the Data Validator
The Data Validator generates a log file with a name formatted as
datavalidator_yymmdd-hhmiss.login the logs directory for each run.
If there are row differences between the source and target tables, a file with a name formatted as
datavalidator_yymmdd-hhmiss.diffis also generated that contains output of the errors in diff format. Use a graphical diff tool like Kompare to view this file to highlight the specific differences.
The Data Validator attempts to create a subdirectory named
XDB_HOME/bindirectory the first time you invoke the Data Validator without the
-ldoption. If you don't invoke the Data Validator as the root account, the run will likely fail as it attempts to create subdirectory
XDB_HOME/bindirectory. Typically only the root account has this privilege.
Windows hosts have the same situation, as the account you're using must have the permission to create a subdirectory in the
XDB_HOME\binlocation. Choices for determining and setting the Data Validator directory for the log and diff files are the following:
Run the Data Validator as the root account. This approach enables the Data Validator to create the
logssubdirectory in the
XDB_HOME/bindirectory and then to create the log and diff files in the
XDB_HOME/bin/logsdirectory structure before running the Data Validator. Modify the permissions on directory
XDB_HOME/bin/logsso the operating system account you use to run the Data Validator has the privilege to create files in the directory.
-ld log_directory_pathoption to allow the Data Validator to create the log and diff files in the specified directory location
log_directory_path. Be sure the operating system account you use to run the Data Validator has the privileges to either create the lowest level subdirectory specified by
log_directory_pathif it doesn't already exist or to create files in the specified directory if the full directory path already does exist.
Once you have determined and verified that the operating system account you plan to use to run the Data Validator can create files in the log directory, you can proceed with performing data validation.