如果需进行对比的表数据量大,且以mode=normal方式进行详细对比,所需执行时间长,直接执行./dmhs_veri命令时,一旦执行界面关闭即代表中断该命令执行,系统后台不会生成数据对比报告,可通过以下方式令其后台运行数据对比任务:
1、创建shell脚本,示例如下:
[oracle@oradb ~]$ cat test.sh
#!/bin/sh
cd $DMHS_HOME/bin #切换到./dmhs_veri所在目录
./dmhs_veri jobfile=job_test.xml mode=normal
备注:job_test.xml是本次需进行数据对比的具体配置。
2、Linux命令行界面通过nohup后台调用上述脚本,指定运行结果存放到a.log(自定义)中:
[oracle@oradb ~]$ nohup sh test.sh > a.log 2>&1 &
[1] 46252
3、通过jobs查看后台任务是否执行完成,jos执行显示无结果表示执行完成:
[oracle@oradb ~]$ nohup sh test.sh > a.log 2>&1 &
[1] 46288
[oracle@oradb ~]$ jobs
[1]+ Running nohup sh test.sh > a.log 2>&1 &
[oracle@oradb ~]$ jobs
[1]+ Exit 1 nohup sh test.sh > a.log 2>&1
[oracle@oradb ~]$ jobs
[oracle@oradb ~]$
(4)查看数据对比工具运行结果(数据对比报告目录信息):
[oracle@oradb ~]$ cat a.log
nohup: 忽略输入
VERI[INFO]: VERI start up, current version: V4.3.08-Build(2023.03.23-126685trunc)_64_2303_sp5
VERI[INFO]: do not set max_out_sync,use the default value
.....
VERI[INFO]: Report j1 thread exit.
VERI[INFO]: Report folder path : /dmhs/bin/report/j1_20230706_004
VERI[INFO]: Summary report file path : /dmhs/bin/report/j1_20230706_004/veri_report_j1.txt #数据对比总体报告
VERI[INFO]: Exit the Verify tool
学习社区: 达梦在线服务平台(https://eco.dameng.com)