How to use veri tools to compare data between DM7

1 Introduction

 

Before you use DMHS for data synchronization, we need to ensure that the synchronization table data of the source and destination is consistent. Usually we can load the source database into the source through the initial loading function of DMHS, but in a production environment, sometimes we find that the destination already has some data. At this time, in order to ensure that the data is not lost, we need to compare the data consistency of the two databases. Here we can use the veri tool. This article will show you how to configure and use the veri tool in DMHS.

 

2. Test environment

 

The comparison environment is a windows dm7 server and a linux dm7 server. The test here is a static comparison without dmhs, so there is no difference between source and destination.

 

3. Configure agent

 

Agent agent.xml, placed in the same directory of the agent program, the default port is 5347, and the others are database-related information. The source and destination of the test environment are the same here. The following is the reference configuration:

 

<?xmlversion="1.0" encoding="utf-8"?>

<agent>

<port>5347</port>

<lang>ch</lang>

<max_session>100</max_session>

<database>

<type>DM7</type>

<server>127.0.0.1</server>

<uid>SYSDBA</uid>

<psw>SYSDBA</psw>

</database>

</agent>

 

4. Configuration comparison tool veri

 

The veri tool already exists in the DMHS installation directory after DMHS is deployed. If DMHS is not configured, you can use the DMHS installation package to install it. The machine on which the process dmhs_veri runs needs to be configured with an odbc environment. You can choose either the source or destination, or the third server, as long as the database is connected through odbc.

 

1) Configure odbc data source directly on windows, DM1, DM2;

2) To configure obbc on Linux, please refer to "How to use ODBC to connect to DM7 database"

3) veri.xml is placed in the same directory as the veri program, mainly for two database odbc connection information, if it is a dmhs environment, you need to configure dmhs parameters. The reference configuration is as follows:

 

<?xmlversion="1.0" encoding="utf-8"?>

<veri>

<lang>ch</lang><!--language just at en or ch -->

<max_thr>40</max_thr>

<max_obj_thr>40</max_obj_thr>

<src>

<agent_server>172.16.20.107</agent_server>

<port>5347</port>

<db_type>DM7</db_type>

<odbc_str>

<dsn>DM1</dsn>

<uid>SYSDBA</uid>

<pwd>SYSDBA</pwd>

</odbc_str>

</src>

<dest>

<agent_server>172.16.20.94</agent_server>

<port>5347</port>

<db_type>DM7</db_type>

<odbc_str>

<dsn>DM2</dsn>

<uid>SYSDBA</uid>

<pwd>SYSDBA</pwd>

</odbc_str>

</dest>

</veri>

 

5. Start the service

 

1) Start the agent service of the two machines, the dm7 database environment, and directly start the dmhs_veri_agent_dm7 program;

2) Start the veri program

 

6. Data comparison

 

6.1 General comparison

This test compares the table in a mode:

dmhs_veri  jobname=job1"table=(TEST.*==TEST.*)" mode=NORMAL

 

 

The job configuration will automatically generate the xml file, or you can configure the xml in advance to execute this job:

 

 

The production report has comparison results, as follows:

 

 

Inconsistent tables will generate a directory, a table is a file, which will be written exactly which is inconsistent,

 

 

6.2 Quick comparison

dmhs_veri  jobname=job2"table=(TEST.*==TEST.*)" mode=fast

 

 

 

Quick comparison only compares the number of data, not specific data:

 

 

Guess you like

Origin blog.csdn.net/qq_42726883/article/details/108399298