DMHS数据对比工具

命令行方式安装

Mount /dev/cdrom /mnt/cdrom

Chmod 755 ./DMHSInstall.bin

./DMHSInstall.bin -i
DMHS数据对比工具_第1张图片

安装完成后 DMHS agent目录在hs_agent目录中,执行程序名为dmhs_agent,默认配置文件名为dmhs_agent.xml

如果用户系统中存在已有的DMHS服务需要进行监控,那么可以将DMHS服务配置在item标签中,作为hs_agent的子节点添加到配置文件中

【配置项说明】
Status_server 后台数据库ip
Server_ip agent所在机器ip
ORACLE agent配置׃agent.xml

26.42
cat /home/dmdba/dmhs/hs_agent/dmhs_agent.xml
<?xml version="1.0" encoding="GB2312"?>
<hs_agent>
	<name>HsAgent</name>
	<lang>ch</lang>
	<server_ip>9.23.26.42</server_ip>
	<lsn_port>5456</lsn_port>
	<status_interval>3</status_interval>
	<status_server>9.23.26.42</status_server>
	<status_port>15236</status_port>
	<status_user>SYSDBA</status_user>
	<status_pwd>SYSDBA</status_pwd>
	<dmhs_support>1</dmhs_support>
	<veri_support>1</veri_support>
	<hs_item>
		<name>DMHS_1</name>
		<startup_flag>2</startup_flag>
		<prog_dir>/home/dmdba/dmhs/bin2</prog_dir>
		<conf_path>/home/dmdba/dmhs/bin2/dmhs.hs</conf_path>
		<svr_name>DmhsServiceHS_BIN2</svr_name>
		<server_ip>9.23.26.42</server_ip>
		<mgr_port>53471</mgr_port>
	</hs_item>
	<agent_item>
		<name>agent_cpt0_src</name>
		<startup_flag>2</startup_flag>
		<agent_ip>9.23.26.42</agent_ip>
		<port>5547</port>
		<svr_name>AgentOraServiceagent_cpt0_src</svr_name>
		<prog_path>/home/dmdba/dmhs/INST_AGENT/agent_cpt0_src/dmhs_veri_agent_ora</prog_path>
		<conf_path>/home/dmdba/dmhs/INST_AGENT/agent_cpt0_src/agent.xml</conf_path>
	</agent_item>
	<veri_item>
		<name>veri_cpt0-exec</name>
		<prog_dir>/home/dmdba/dmhs/INST_VERI/veri_cpt0-exec</prog_dir>
		<conf_path>/home/dmdba/dmhs/INST_VERI/veri_cpt0-exec/veri.xml</conf_path>
	</veri_item>
</hs_agent>



DM agent配置׃agent.xml
64.21

[dmdba@b022-phibs-64-21 ~]$ cat /dmdb/dmhs/hs_agent/dmhs_agent.xml 
<?xml version="1.0" encoding="GB2312"?>
<hs_agent>
	<name>HsAgent</name>
	<lang>ch</lang>
	<server_ip>9.23.64.21</server_ip>
	<lsn_port>5456</lsn_port>
	<status_interval>3</status_interval>
	<status_server>9.23.26.42</status_server>
	<status_port>15236</status_port>
	<status_user>SYSDBA</status_user>
	<status_pwd>SYSDBA</status_pwd>
	<dmhs_support>1</dmhs_support>
	<veri_support>1</veri_support>
	<hs_item>
		<name>DMHS_2</name>
		<startup_flag>2</startup_flag>
		<prog_dir>/dmdb/dmhs/bin2</prog_dir>
		<conf_path>/dmdb/dmhs/bin2/dmhs.hs</conf_path>
		<svr_name>DmhsServiceHS</svr_name>
		<server_ip>9.23.64.21</server_ip>
		<mgr_port>53477</mgr_port>
	</hs_item>
	<agent_item>
		<name>agent_exec_dest</name>
		<startup_flag>2</startup_flag>
		<agent_ip>9.23.64.21</agent_ip>
		<port>5647</port>
		<svr_name>AgentDm8Serviceagent_exec_dest</svr_name>
		<prog_path>/dmdb/dmhs/INST_AGENT/agent_exec_dest/dmhs_veri_agent_dm8</prog_path>
		<conf_path>/dmdb/dmhs/INST_AGENT/agent_exec_dest/agent.xml</conf_path>
	</agent_item>
</hs_agent>

配置veri.xml文件

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<veri>
    <lang>en</lang>
    <gen_html>0</gen_html>
    <stat_flag>0</stat_flag>
    <report_left_num>3</report_left_num>
    <col_opt>1</col_opt>
    <char_code>PG_GBK</char_code>
	<dmhs>
        <server_name>9.23.64.21</server_name>
        <port>53477</port>
        <site_id>10</site_id>
    </dmhs>
    <src>
        <agent_server>9.23.26.42</agent_server>
        <port>5547</port>
        <db_type>ORACLE11G</db_type>
        <odbc_str>
            <db_server>9.23.26.42:1521/WXDB112</db_server>
            <db_port>1521</db_port>
            <db_user>dmhs</db_user>
            <db_pwd>admin123</db_pwd>
        </odbc_str>
    </src>
    <dest>
        <agent_server>9.23.64.21</agent_server>
        <port>5647</port>
        <db_type>dm8</db_type>
        <odbc_str>
            <db_server>9.23.64.21</db_server>
            <db_port>5241</db_port>
            <db_user>WEIXINUSER</db_user>
            <db_pwd>WEIXINUSER</db_pwd>
        </odbc_str>
    </dest>
    <link_id>cpt(9.23.26.42:53471)--&gt;exec(9.23.64.21:53477)</link_id>
</veri>

配置ODBC
[oracle@oracle etc]$ cat odbc.ini
[DMHS]
Description = ORACLE ODBC DSN
Driver = Oracle in OraDb11g_home1
SERVER = 9.23.26.42
UID = dmhs
PWD = admin123
Servername = wxdb112
PORT = 1521
[dmdba@prd-T005-ap-26-42 etc]$ cat odbcinst.ini
[Oracle in OraDb11g_home1]
Description= Oracle in OraDb11g_home1
Driver=/u01/app/oracle/product/12.2/db/lib/libsqora.so.11.1

[DM8 ODBC DRIVER]
Description = ODBC DRIVER FOR DM8
DRIVER = /home/dmdba/dmhs/db/bin/libdodbc.so

配置对比项
[dmdba@prd-T005-ap-26-42 veri_cpt0-exec]$ cat job1.xml

<?xml version="1.0" encoding="GB2312" standalone="no"?>
<job>
    <name>job1</name>
    <table_list>
        <table_info>
            <table_name>WEIXINUSER.T_BRANCH==WEIXINUSER.T_BRANCH</table_name>
        </table_info>
    </table_list>
</job>

执行对比命令
/home/dmdba/dmhs/INST_VERI/veri_cpt0-exec/dmhs_veri JOBNAME=job1 JOBFILE=job1.xml mode=NORMAL use_key=0 get_raw_data=1 count=0 task_id=15 ppid=6222

详细手册可参考达梦官方网站,或登录社区进行交流学习
https://eco.dameng.com

你可能感兴趣的:(oracle,数据库,database)