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/extdirectory.Edit the
datavalidator.propertiesfile located in theXDB_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
datavalidator.properties file.Parameter Descripton source_dbmsType of the source database. Values can be enterprisedb, oracle, sqlserver, sybase, or mysql. source_hostIP address or server name of the host running the database server of the source database source_portPort number on which the database server of the source database listens for requests source_databaseDatabase name of the source database source_userDatabase user name of the source database source_passwordUnencrypted password of the source database user target_dbmsType of the target database. Values can be enterprisedb or oracle. target_hostIP address or server name of the host running the database server of the target database target_portPort number on which the database server of the target database listens for requests target_databaseDatabase name of the target database target_userDatabase user name of the target database target_passwordUnencrypted password of the target database user The following is the initial content of the
datavalidator.propertiesfile after installation:############################################################### Source database connection ############################################################### #source_dbms=(enterprisedb | oracle | sqlserver | sybase | mysql) source_dbms=oracle source_host=localhost source_port=1521 source_database=xe source_user=hr source_password=hr #source_dbms=mysql #source_host=localhost #source_port=3306 #source_database=test #source_user=root #source_password= #source_dbms=sqlserver #source_host=localhost #source_port=1433 #source_database=pubs #source_user=sa #source_password= #source_dbms=sybase #source_host=localhost #source_port=5004 #source_database=test #source_user=sa #source_password= ############################################################### Target database connection ############################################################### #target_dbms=(enterprisedb | oracle) target_dbms=enterprisedb target_host=localhost target_port=5444 target_database=edb target_user=enterprisedb target_password=edbBefore invoking the Data Validator for the first time, determine the location of the Data Validator
logsdirectory.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
logsin theXDB_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 subdirectorylogsin theXDB_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 theXDB_HOME/bindirectory and then to create the log and diff files in thelogssubdirectory.Create the
XDB_HOME/bin/logsdirectory structure before running the Data Validator. Modify the permissions on directoryXDB_HOME/bin/logsso 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_pathoption 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_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.