Files
doc-exports/docs/dws/tool/dws_07_0209.html
luhuayi a5e3903f6b DWS TG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-04-23 13:53:01 +00:00

53 lines
12 KiB
HTML

<a name="EN-US_TOPIC_0000001860318517"></a><a name="EN-US_TOPIC_0000001860318517"></a>
<h1 class="topictitle1">Using DataCheck</h1>
<div id="body0000001772976926"><div class="section" id="EN-US_TOPIC_0000001860318517__en-us_topic_0000001432327697_section1434510584915"><h4 class="sectiontitle">Notes</h4><ul id="EN-US_TOPIC_0000001860318517__en-us_topic_0000001432327697_ul04631634911"><li id="EN-US_TOPIC_0000001860318517__en-us_topic_0000001432327697_li204661684913">Before starting DataCheck, configure the <strong id="EN-US_TOPIC_0000001860318517__b1159612541682">dbinfo.properties</strong> and <strong id="EN-US_TOPIC_0000001860318517__b14310125820816">check_input.xlsx</strong> files in the <strong id="EN-US_TOPIC_0000001860318517__b104371111693">config</strong> folder. Incorrect parameter settings will cause DataCheck execution errors.</li><li id="EN-US_TOPIC_0000001860318517__li42195343215">If you are running DataCheck tasks concurrently on the same server (by the same or different tasks), it is important to use separate <strong id="EN-US_TOPIC_0000001860318517__b862678290">check_input.xlsx</strong> files for each task.</li><li id="EN-US_TOPIC_0000001860318517__li123551982323">After running DataCheck, a <strong id="EN-US_TOPIC_0000001860318517__b1779516141920">logs</strong> 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.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001860318517__section562103417324"><h4 class="sectiontitle">Using DataCheck on Linux</h4><ol id="EN-US_TOPIC_0000001860318517__ol13877135115322"><li id="EN-US_TOPIC_0000001860318517__li087775193214"><span>Upload the tool package to the Linux server and decompress it.</span><p><p id="EN-US_TOPIC_0000001860318517__p11882101011336"><span><img id="EN-US_TOPIC_0000001860318517__image181241624204818" src="figure/en-us_image_0000002114138993.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li153228551638"><span>Generate the ciphertext of the database login password.</span><p><p id="EN-US_TOPIC_0000001860318517__p349335420487">Go to the <strong id="EN-US_TOPIC_0000001860318517__b23541447153415">bin</strong> directory.</p>
<p id="EN-US_TOPIC_0000001860318517__p1550771205012"><span><img id="EN-US_TOPIC_0000001860318517__image757891215507" src="figure/en-us_image_0000002114139545.png"></span></p>
<p id="EN-US_TOPIC_0000001860318517__p172051925164915">Run the script for generating the ciphertext. Run this script to generate ciphertext for the login passwords of the source and destination databases.</p>
<p id="EN-US_TOPIC_0000001860318517__p3641652124911">sh encryption.sh [password]</p>
<p id="EN-US_TOPIC_0000001860318517__p8656425144910"><span><img id="EN-US_TOPIC_0000001860318517__image11390145595014" src="figure/en-us_image_0000002114139789.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li186508783311"><span>Configure the <strong id="EN-US_TOPIC_0000001860318517__b11175174310386">conf/dbinfo.properties</strong> file.</span><p><p id="EN-US_TOPIC_0000001860318517__p13722315141417">Go to the Datacheck directory and run the <strong id="EN-US_TOPIC_0000001860318517__b1538722523512">vi conf/dbinfo.properties</strong> command.</p>
<p id="EN-US_TOPIC_0000001860318517__p189611216111414"><span><img id="EN-US_TOPIC_0000001860318517__image10928631121615" src="figure/en-us_image_0000002078549004.png"></span></p>
<p id="EN-US_TOPIC_0000001860318517__p5380957941">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.</p>
<p id="EN-US_TOPIC_0000001860318517__p1037413501413"><span><img id="EN-US_TOPIC_0000001860318517__image2374105010411" src="figure/en-us_image_0000002114144325.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li11488719153318"><span>Edit the <strong id="EN-US_TOPIC_0000001860318517__b10410628366">input/check_input.xlsx</strong> file.</span><p><p id="EN-US_TOPIC_0000001860318517__p6627926201714">Copy the <strong id="EN-US_TOPIC_0000001860318517__b58272016113611">check_input.xlsx</strong> 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.</p>
<p id="EN-US_TOPIC_0000001860318517__p3845324151716"><span><img id="EN-US_TOPIC_0000001860318517__image384517243175" src="figure/en-us_image_0000002114220901.png" width="497.42" height="26.5069" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li13955902384"><span>Run the data check tool.</span><p><p id="EN-US_TOPIC_0000001860318517__p172101722191914">Go to the bin directory and run the <strong id="EN-US_TOPIC_0000001860318517__b66485314364">sh datacheck.sh</strong> script.</p>
<p id="EN-US_TOPIC_0000001860318517__p539455961911"><span><img id="EN-US_TOPIC_0000001860318517__image041710331202" src="figure/en-us_image_0000002078705432.png" width="497.42" height="31.148600000000005" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li229771819382"><span>View the result <strong id="EN-US_TOPIC_0000001860318517__b19586148399">output/check_input_result.xlsx</strong>.</span><p><p id="EN-US_TOPIC_0000001860318517__p12482185843118"><span><img id="EN-US_TOPIC_0000001860318517__image677905873110" src="figure/en-us_image_0000002114228013.png" width="497.42" height="300.9657" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li459983913381"><span>Check result analysis:</span><p><ol type="a" id="EN-US_TOPIC_0000001860318517__ol7212161512399"><li id="EN-US_TOPIC_0000001860318517__li172121715153916">If <strong id="EN-US_TOPIC_0000001860318517__b24568559101">Status</strong> is <strong id="EN-US_TOPIC_0000001860318517__b9457115591013">No Pass</strong>, the check fails.</li><li id="EN-US_TOPIC_0000001860318517__li18775519133913">The <strong id="EN-US_TOPIC_0000001860318517__b1616400360">Check Result Diff</strong> column displays the items that fail to pass the check. You can view the column that fails to pass the check.</li><li id="EN-US_TOPIC_0000001860318517__li10643722133911">The <strong id="EN-US_TOPIC_0000001860318517__b169835653618">Check SQL</strong> area displays the query SQL statements that are executed in the database.</li></ol>
</p></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001860318517__section1875112172114"><h4 class="sectiontitle">Using DataCheck on Windows</h4><ol id="EN-US_TOPIC_0000001860318517__ol135661626202119"><li id="EN-US_TOPIC_0000001860318517__li4566172692116"><span>Upload the tool package to the Windows server and decompress it.</span><p><p id="EN-US_TOPIC_0000001860318517__p13908541172410"><span><img id="EN-US_TOPIC_0000001860318517__image91119152818" src="figure/en-us_image_0000002114760145.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li2578253124819"><span>Generate the ciphertext of the database login password.</span><p><p id="EN-US_TOPIC_0000001860318517__p457815319488">Go to the <strong id="EN-US_TOPIC_0000001860318517__b17806138133720">bin</strong> directory and start the CMD tool.</p>
<p id="EN-US_TOPIC_0000001860318517__p12578553194814"><span><img id="EN-US_TOPIC_0000001860318517__image562518466281" src="figure/en-us_image_0000002079322158.png"></span></p>
<p id="EN-US_TOPIC_0000001860318517__p55791953134811">Run the script for generating the ciphertext. Run this script to generate ciphertext for the login passwords of the source and destination databases.</p>
<p id="EN-US_TOPIC_0000001860318517__p14579853104812">encryption.bat [password]</p>
<p id="EN-US_TOPIC_0000001860318517__p2579125314487"><span><img id="EN-US_TOPIC_0000001860318517__image15393192614327" src="figure/en-us_image_0000002079011850.png" width="497.42" height="69.9979" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li4278132272415"><span>Configure the <strong id="EN-US_TOPIC_0000001860318517__b1616314143910">conf/dbinfo.properties</strong> file.</span><p><p id="EN-US_TOPIC_0000001860318517__p722095533615">Edit the <strong id="EN-US_TOPIC_0000001860318517__b14226112112379">dbinfo.properties</strong> file in the <strong id="EN-US_TOPIC_0000001860318517__b657542317372">conf</strong> 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.</p>
<p id="EN-US_TOPIC_0000001860318517__p203545513369"><span><img id="EN-US_TOPIC_0000001860318517__image103541251103613" src="figure/en-us_image_0000002079013756.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li37089911258"><span>Edit the <strong id="EN-US_TOPIC_0000001860318517__b4431154273713">input/check_input.xlsx</strong> file and save it.</span><p><p id="EN-US_TOPIC_0000001860318517__p1764003312371">Open the <strong id="EN-US_TOPIC_0000001860318517__b26641167385">input/check_input.xlsx</strong> file using Excel, input the table information that needs to be verified, and save the file.</p>
<p id="EN-US_TOPIC_0000001860318517__p864013332373"><span><img id="EN-US_TOPIC_0000001860318517__image2640133163716" src="figure/en-us_image_0000002114856101.png" width="497.42" height="26.5069" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li11702102320253"><span>Run the data check tool <strong id="EN-US_TOPIC_0000001860318517__b26801538121117">datacheck.bat</strong>.</span><p><p id="EN-US_TOPIC_0000001860318517__p1391133572514"><span><img id="EN-US_TOPIC_0000001860318517__image25084187417" src="figure/en-us_image_0000002079018184.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li19584132142517"><span>View the result <strong id="EN-US_TOPIC_0000001860318517__b4155134518113">output/check_input_result.xlsx</strong>. (The result analysis is the same as that in the Linux scenario.)</span><p><p id="EN-US_TOPIC_0000001860318517__p0496152110263"><span><img id="EN-US_TOPIC_0000001860318517__image1271213127426" src="figure/en-us_image_0000002079331782.png" width="497.42" height="300.9657" title="Click to enlarge" class="imgResize"></span></p>
<p id="EN-US_TOPIC_0000001860318517__p12334126132816"><span><img id="EN-US_TOPIC_0000001860318517__image1472481788" src="figure/en-us_image_0000002084159912.png" width="497.42" height="292.8793" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001860318517__li6785931172611"><span>Check result analysis:</span><p><ol type="a" id="EN-US_TOPIC_0000001860318517__ol278512319265"><li id="EN-US_TOPIC_0000001860318517__li167851931162615">If <strong id="EN-US_TOPIC_0000001860318517__b076929128">Status</strong> is <strong id="EN-US_TOPIC_0000001860318517__b3771823125">No Pass</strong>, the check fails.</li><li id="EN-US_TOPIC_0000001860318517__li87851931152610">The <strong id="EN-US_TOPIC_0000001860318517__b17869595370">Check Result Diff</strong> column displays the items that fail to pass the check. You can view the column that fails to pass the check.</li><li id="EN-US_TOPIC_0000001860318517__li10785431102612">The <strong id="EN-US_TOPIC_0000001860318517__b149607018384">Check SQL</strong> area displays the query SQL statements that are executed in the database.</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_07_0200.html">DataCheck</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>