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.
File name | Location | Description |
---|---|---|
datavalidator.properties | XDB_HOME/etc | Data Validator Properties file |
runValidation.sh (Linux) | XDB_HOME/bin | Data Validator execution script |
runValidation.bat (Windows) | XDB_HOME\bin | Data Validator execution script |
Note
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
JAVA_HOME/jre/lib/ext
directory.Edit the
datavalidator.properties
file located in theXDB_HOME/etc
directory 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
datavalidator.properties file
.Parameter Descripton source_dbms
Type of the source database. Values can be enterprisedb, oracle, sqlserver, sybase, or mysql. source_host
IP address or server name of the host running the database server of the source database source_port
Port number on which the database server of the source database listens for requests source_database
Database name of the source database source_user
Database user name of the source database source_password
Unencrypted password of the source database user target_dbms
Type of the target database. Values can be enterprisedb or oracle. target_host
IP address or server name of the host running the database server of the target database target_port
Port number on which the database server of the target database listens for requests target_database
Database name of the target database target_user
Database user name of the target database target_password
Unencrypted password of the target database user The following is the initial content of the
datavalidator.properties
file after installation:Before invoking the Data Validator for the first time, determine the location of the Data Validator
logs
directory.The Data Validator generates a log file with a name formatted as
datavalidator_yymmdd-hhmiss.log
in 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.diff
is 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
logs
in theXDB_HOME/bin
directory the first time you invoke the Data Validator without the-ld
option. If you don't invoke the Data Validator as the root account, the run will likely fail as it attempts to create subdirectorylogs
in theXDB_HOME/bin
directory. 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\bin
location. 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
logs
subdirectory in theXDB_HOME/bin
directory and then to create the log and diff files in thelogs
subdirectory.Create the
XDB_HOME/bin/logs
directory structure before running the Data Validator. Modify the permissions on directoryXDB_HOME/bin/logs
so the operating system account you use to run the Data Validator has the privilege to create files in the directory.Use the
-ld log_directory_path
option to allow the Data Validator to create the log and diff files in the specified directory locationlog_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 bylog_directory_path
if 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.