veri configuration & use of dmhs data comparison tool

VERI description

dmhs comes with its own comparison tool. After installing dmhs, you can find it in the bin directory, named dmhs_veri
The tool needs to use unixODBC, version 2.3.0 and above, which is used to connect oracle and other databases. If dm, No.

VERI needs an AGENT for data acquisition, which is the AGENT service of the comparison tool.
Like dmhs, veri and agetn can be installed on the third machine.
Only in the verification process DMHS_ Only machines running veri need to install and configure unixODBC.
dmhs has its own Guard tool called dmhs_agent also has its own configuration file dmhs_agent.xml, and the background startup script is DmhsAgentService
veri also has an agent because it needs to obtain data. Don't confuse it with dmhs. The background startup script is AgentDm8Service

This paper takes oracle on the source side and dm8 on the destination side as examples

[install unixODBC]

Using the oracle user, in the user root directory, add the following

vim .bash_profile

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:$ORACLE_HOME/lib

source .bash_profile

Execute lsnrctl status to ensure that the listener The HOST parameter in the ora file is consistent with the hostname of the current machine

[configure unixODBC]

Use root user

cd /usr/local/etc

##### odbcinst.ini ####
Write 0 when configuring driver and threading

vim odbcinst.ini

[Oracle in OraDb11g_home1]
Description = Oracle ODBC driver for Oracle 11g
Driver      = /u01/app/oracle/product/11.2.0/db_1/lib/libsqora.so.11.1
Threading   = 0

#New configuration dm8 ODBC source
[DM8 ODBC DRIVER]
Description = ODBC driver for DM8
Driver = /home/oracle/dm8/bin/libdodbc.so
Threading = 0

#### odbc.ini ####
Configure 2 DSN s

vim odbc.ini

[ORACLE]
Description = ORACLE ODBC DSN
Driver = Oracle in OraDb11g_home1
SERVER = 127.0.0.1
UserID = DMHS
Password = DMHS123456
Servername = ORCL
PORT = 1521
CHARSET=UTF8

#Add and configure dm8 ODBC source
[DM8]
Description = DM8 ODBC DSN
Driver = DM8 ODBC DRIVER
SERVER = 192.168.238.135
UID = SYSDBA
PWD = SYSDBA
TCP_PORT = 5237

Check that the database version and ODBC version are both 32-bit or 64 bit, otherwise they cannot run successfully. Elf 64 bit is 64 bit

file /u01/oracle/lib/libsqora.so.11.1
file /usr/local/bin/odbcinst

[Database permission]

Switch back to oracle and dmdba users
If oracle does not use DBA users, add permissions. Take TEST as an example

grant select on all_tables to TEST;
grant select on dba_cons_columns to TEST;
grant select on dba_tab_columns to TEST;
grant select on dba_constraints to TEST;

--Lock mode
GRANT CREATE SESSION TO TEST;
GRANT SELECT ANY TABLE TO TEST;
GRANT CREATE TABLE TO TEST;
GRANT EXECUTE ON DBMS_FLASHBACK TO TEST;
GRANT LOCK ANY TABLE TO TEST;

--Flashback query( SCN)pattern
GRANT CREATE SESSION TO TEST;
GRANT SELECT ANY TABLE TO TEST;
GRANT CREATE TABLE TO TEST;
GRANT CREATE ANY TABLE TO TEST;
GRANT DROP ANY TABLE TO TEST;
GRANT EXECUTE ON DBMS_FLASHBACK TO TEST;
GRANT FLASHBACK ANY TABLE TO TEST;

[write agent configuration]

#####On the source side, create a configuration file in the bin directory of dmhs#####

vim agent.xml

<?xml version="1.0" encoding="utf-8"?>
<agent>
 <port>5347</port>  <!-- This is agent Port -->
 <lang>en</lang>
 <max_session>100</max_session>
 
 <!-- <mode>0</mode> -->  <!-- This is a dynamic contrast that needs to be added mode Control parameters. 0: dynamic comparison table locking mode; 1: Dynamic contrast flashback query mode. Only in Oracle Valid in. -->
 
 <database>
  <type>Oracle11g</type>
  <server>orcl</server>
  <uid>DMHS</uid>
  <psw>DMHS123456</psw>
  <!-- <port></port> The database port can not be written when it is the default port, and it is not written when it is not the default port -->
 </database>
</agent>


#####On the destination side, create a configuration file in the bin directory of dmhs#####

vim agent.xml

<?xml version="1.0" encoding="utf-8"?>
<agent>
 <port>5347</port>  <!-- This is agent Port -->
 <lang>en</lang>
 <max_session>100</max_session>
 
 <!-- <mode>0</mode> -->  <!-- This is a dynamic contrast that needs to be added mode Control parameters. 0: dynamic comparison table locking mode; 1: Dynamic contrast flashback query mode. Only in Oracle Valid in. -->

 <database>
  <type>DM8</type>
  <server>192.168.238.135</server>
  <uid>SYSDBA</uid>
  <psw>SYSDBA</psw>
  <port>5237</port>  <!-- here port yes dm8 Listening port for -->
 </database>
</agent>

[configure veri]

In the bin directory of dmhs, create a configuration file
Veri can be placed on the source side together with unixODBC. Or veri and UNIX ODBC are all put on the third machine.

<?xml version="1.0" encoding="utf-8"?>
<veri>
 <lang>en</lang> <!-- language just at en or ch -->
 <max_thr>40</max_thr>
 
 <!-- <dmhs> <!-- dmhs_server for destionation -->
 <server_name>192.168.238.134</server_name>
 <port>5345</port>
 <site_id>1</site_id>
 </dmhs> -->  <!-- This is what needs to be added during dynamic comparison. What needs to be added is dmhs Node information -->
 
 <src>  <!-- Source end agent Configuration of -->
  <agent_server>192.168.238.134</agent_server>
  <port>5347</port>  <!-- This is agent Port -->
  <db_type>ORACLE11g</db_type>
  <odbc_str>
   <!-- <dsn>ORACLE</dsn> -->
   <db_server>192.168.238.134:/orcl</db_server>
   <db_user>DMHS</db_user>
   <db_pwd>DMHS123456</db_pwd>
  </odbc_str>
 </src>
 <dest>  <!-- Destination end agent Configuration of -->
  <agent_server>192.168.238.135</agent_server>
  <port>5347</port>  <!-- This is agent Port -->
  <db_type>DM8</db_type>
  <odbc_str>
   <!-- <dsn>DM8</dsn> -->
   <db_server>192.168.238.135</db_server>
   <db_user>SYSDBA</db_user>
   <db_pwd>SYSDBA</db_pwd>
   <db_port>5237</db_port>
  </odbc_str>
 </dest>
</veri>

[start agent]

In the bin directory of dmhs
Source side:/ dmhs_veri_agent_ora agent.xml
Destination:/ dmhs_veri_agent_dm8 agent.xml


[compare]

In the bin directory of dmhs

#General comparison
./dmhs_veri "TABLE=(TEST.*==TEST.*)" mode=normal

#Quick comparison
./dmhs_veri "TABLE=(TEST.*==TEST.*)" mode=fast

#Dynamic comparison
./dmhs_veri "TABLE=(TEST.*==TEST.*)" mode=dyn

./dmhs_veri "table=((TEST.T1,TEST.T2)==(SYSDBA.T1,SYSDBA.T2))" MODE=DYN

[configure background startup]

Configure the background startup of veri agent. The source end and destination end are the same, but the files are different
In the bin directory of dmhs, click service_template
#The source and destination databases copy the Agent

cp AgentDm8Service ../AgentDm8Service_01
vim AgentDm8Service

DMHS_HOME="dmhs Installation directory, default:/opt/dmhs"
PROG_DIR="agent Run script directory, default:/opt/dmhs/bin"
CONF_PATH="agent The directory where the configuration file is located. Default:/opt/dmhs/bin/agent.xml"

AgentDm8Service corresponds to dmhs_veri_agent_dm8
DMHS corresponding to AgentOraService_ veri_ agent_ ora
dmhs corresponding to DmhsAgentService_ Agent, which is the guard tool of dmhs, pay attention to the distinction.


 

Keywords: Database Oracle

Added by highphilosopher on Sun, 23 Jan 2022 17:00:47 +0200