Using DataCheck
Notes
- Before starting DataCheck, configure the dbinfo.properties and check_input.xlsx files in the config folder. Incorrect parameter settings will cause DataCheck execution errors.
- If you are running DataCheck tasks concurrently on the same server (by the same or different tasks), it is important to use separate check_input.xlsx files for each task.
- After running DataCheck, a logs folder is created. You can open this folder to review the logs generated during the execution of DataCheck, which can assist you in identifying any problems.
Using DataCheck on Linux
- Upload the tool package to the Linux server and decompress it.

- Generate the ciphertext of the database login password.
Go to the bin directory.

Run the script for generating the ciphertext. Run this script to generate ciphertext for the login passwords of the source and destination databases.
sh encryption.sh [password]

- Configure the conf/dbinfo.properties file.
Go to the Datacheck directory and run the vi conf/dbinfo.properties command.

Configure the database connection information of the source and destination ends. Use the ciphertext generated in the previous step for the password in the configuration file.

- Edit the input/check_input.xlsx file.
Copy the check_input.xlsx file to the Windows server, use Excel to edit the file, enter the table information to be verified, save the file, and upload the file to the Linux server to overwrite the original file.

- Run the data check tool. Two startup modes are supported.
- Method 1: default mode. The concurrency and verification file path are not specified. The tool is quickly started.
Go to the bin directory and run the startup script.
sh datacheck.sh

- Method 2: custom mode. You can specify parameters for startup.
If you need to specify the verification task file or adjust the concurrency efficiency, run the following command:
sh datacheck.sh [Concurrency] [Verification file path]
The following describes the comparisons between the two restart modes.
Table 1 Startup modes Mode
Parameter 1: Concurrency
Parameter 2: File path
Effect
Default mode
Leave this parameter blank.
If this parameter is left blank, /input/check_input.xlsx is used by default.
Use the default values.
Custom mode
Mandatory. For example, 1.
Optional. For example, /input/x.xlsx. If this parameter is left blank, the default path is used.
Use the specified concurrency and file.
- Method 1: default mode. The concurrency and verification file path are not specified. The tool is quickly started.
- View the result output/check_input_result.xlsx.

- Check result analysis:
- If Status is No Pass, the check fails.
- The Check Result Diff column displays the items that fail to pass the check. You can view the column that fails to pass the check.
- The Check SQL area displays the query SQL statements that are executed in the database.
Using DataCheck on Windows
- Upload the tool package to the Windows server and decompress it.

- Generate the ciphertext of the database login password.
Go to the bin directory and start the CMD tool.

Run the script for generating the ciphertext. Run this script to generate ciphertext for the login passwords of the source and destination databases.
encryption.bat [password]

- Configure the conf/dbinfo.properties file.
Edit the dbinfo.properties file in the conf directory, configure the database connection information of the source and destination ends, and use the ciphertext generated in the previous step as the password in the configuration file.

- Edit the input/check_input.xlsx file and save it.
Open the input/check_input.xlsx file using Excel, input the table information that needs to be verified, and save the file.

- Start the data check tool datacheck.bat in either of the following ways:
- Method 1: default mode. The concurrency and verification file path are not specified. The tool is quickly started.
Go to the bin directory and run the startup script.
Run the following command in PowerShell:
.\datacheck.bat
Alternatively, run the following command in the cmd window:
datacheck.bat

- Method 2: custom mode. You can specify parameters for startup.
If you need to specify the verification task file or adjust the concurrency efficiency, run the following command:
.\datacheck.bat [Concurrency] "[File path]"
The following describes the comparisons between the two restart modes.
Table 2 Startup modes Mode
Parameter 1: Concurrency
Parameter 2: File path
Effect
Default mode
Leave this parameter blank.
If this parameter is left blank, /input/check_input.xlsx is used by default.
Use the default values.
Custom mode
Mandatory. For example, 1.
Optional. For example, /input/x.xlsx. If this parameter is left blank, the default path is used.
Use the specified concurrency and file.
- Method 1: default mode. The concurrency and verification file path are not specified. The tool is quickly started.
- View the result output/check_input_result.xlsx. (The result analysis is the same as that in the Linux scenario.)

- Check result analysis:
- If Status is No Pass, the check fails.
- The Check Result Diff column displays the items that fail to pass the check. You can view the column that fails to pass the check.
- The Check SQL area displays the query SQL statements that are executed in the database.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot