sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 运维DBA >

【学习笔记】总结分享一篇关于DDS数据对比测试

时间:2016-10-28 22:40   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心学习笔记:分享一篇关于DDS数据对比测试,DDS数据对比测试是基本行的数据对比。

1,修改目标端对比进程个数

[dds@oracleplus.net data]$cat ddstart
#!/bin/sh

if [ "${NLS_LANG}NONE" = "NONE" ]
then
echo "Error: NLS_LANG is not set."
exit -1
fi

if [ "${ORACLE_HOME}NONE" = "NONE" ]
then
echo "Error: ORACLE_HOME is not set."
exit -1
fi

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib
DDS_HOME=/oracle/app/dds/1123/bin
DDS_DATA=/oracle/app/dds/1123/data
export DDS_HOME DDS_DATA LD_LIBRARY_PATH

${DDS_HOME}/dds_pmont -v

${DDS_HOME}/dds_pmont

if [ $ -eq 0 ]
then
# rm $DDS_DATA/msg.log 2>/dev/null
${DDS_HOME}/dds_pmsgt
${DDS_HOME}/dds_precvt
${DDS_HOME}/dds_pclr
${DDS_HOME}/dds_pfile
${DDS_HOME}/dds_pput
${DDS_HOME}/dds_pput -1
${DDS_HOME}/dds_pput -1
${DDS_HOME}/dds_pput -1
${DDS_HOME}/dds_pput -x这增加几行进程用于数据对比
else
exit -1
fi

2,odmp导出对比数据

[dds@htz62 ~]$ odmp -c 192.168.111.63:8204 -x -t scott dds1/dds1
0808162429[5.DMP00] Dump Task: 1 SCOTT.DEPT
0808162429[5.DMP00] Dump Task: 2 SCOTT.EMP
0808162429[5.DMP00] Dump Task: 3 SCOTT.BONUS
0808162429[5.DMP00] Dump Task: 4 SCOTT.SALGRADE
0808162429[5.DMP00] Dump Task: 5 SCOTT.HTZ
0808162429[5.DMP00] Starting DMP Processes (nreader=1, Verify:Y)
0808162429[5.DMP00] ok to login [dds1/dds1]
0808162429[5.DMP00] DmpOUT: 192.168.111.63:8204 HOST:192.168.111.63 PORT: 8204
0808162429[5.DMP00] GetDATA for SCOTT.DEPT
0808162429[5.DMP00] Count of Record: SCOTT.DEPT4 DataLEN=43
0808162429[5.DMP00] Get SCOTT.DEPT Time: 124 ms
0808162429[5.DMP00] GetDATA for SCOTT.EMP
0808162429[5.DMP00] Count of Record: SCOTT.EMP14 DataLEN=83
0808162429[5.DMP00] Get SCOTT.EMP Time: 14 ms
0808162429[5.DMP00] GetDATA for SCOTT.BONUS
0808162429[5.DMP00] Count of Record: SCOTT.BONUS0 DataLEN=0
0808162429[5.DMP00] Get SCOTT.BONUS Time: 10 ms
0808162429[5.DMP00] GetDATA for SCOTT.SALGRADE
0808162429[5.DMP00] Count of Record: SCOTT.SALGRADE5 DataLEN=47
0808162429[5.DMP00] Get SChttp://www.oracleplus.netOTT.SALGRADE Time: 41 ms
0808162429[5.DMP00] GetDATA for SCOTT.HTZ
0808162430[5.DMP00] Count of Record: SCOTT.HTZ50079 DataLEN=229341
0808162430[5.DMP00] Get SCOTT.HTZ Time: 578 ms
0808162431[5.DMP00] DMP0 RC: R=0 P=0 W=0
0808162431[5.DMP00] Reader EXIT ( PID=6715 dumper=0, rc=0 )
0808162431[5.DMP00] CHILD: 6715 EXIT(0)
0808162431[5.DMP00]
+——————————————+
| Dmp Finish: return=0 SUCCESSFULE |
+——————————————+

3,目标端日志

目标端日志
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/1.dtf (LEN=65)
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/2.dtf (LEN=43)
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/3.dtf (LEN=50)
0808162431[5.CHK00] Verify OK SCOTT.DEPT->HTZ.DEPT Rows: 4~4 OK:4
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/4.dtf (LEN=64)
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/5.dtf (LEN=83)
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/6.dtf (LEN=49)
0808162431[5.CHK00] Verify OK SCOTT.EMP->HTZ.EMP Rows: 14~14 OK:14
0808162431[5.CHK00] Load /home/dds/dds/data/chk0/0/7.dtf (LEN=66)
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/8.dtf (LEN=51)
0808162432[5.CHK00] Verify OK SCOTT.BONUS->HTZ.BONUS Rows: 0~0 OK:0
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/9.dtf (LEN=69)
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/10.dtf (LEN=47)
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/11.dtf (LEN=54)
0808162432[5.CHK00] Verify OK SCOTT.SALGRADE->HTZ.SALGRADE Rows: 5~5 OK:5
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/12.dtf (LEN=64)
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/13.dtf (LEN=229341,zLEN=178104 77%)
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/14.dtf (LEN=49)
0808162432[5.CHK00] Verify OK SCOTT.HTZ->HTZ.HTZ Rows: 50079~50079 OK:50079
0808162432[5.CHK00] Load /home/dds/dds/data/chk0/0/15.dtf (LEN=5)
0808162432[5.CHK00] End Verify objects: OK-5 ERROR-0
0808162432[5.CHK00] End Verify

4,verify日志内容

[dds@htz63 chk0]$ cat verify.txt

************************************************
Verify SCOTT.DEPT — HTZ.DEPT
Rows in source table:4
Rows in target table:4
Rows in same table:4
Rows not in source table:0
Rows not in target table:0
Rows not equal :0
Rows has Other Error:0
Counts of slot no> 512:0
Start from: 2014-07-08 16:24:31
End at : 2014-07-08 16:24:31
Total : 0
************************************************

5,报错日志内容

如果有错误,会在下面显示出来的

[dds@htz63 chk0]$ cat verify.err

************************************************
Verify SCOTT.HTZ — HTZ.HTZ
Rows in source table:0
Rows in target table:50079
Rows in same table:0
Rows not in source table:0
Rows not in target table:0
Rows not equal :0
Rows has Other Error:0
Counts of slot no> 512:0
Start from: 2014-07-08 16:52:46
End at : 2014-07-08 16:52:46
Total : 0
************************************************
Err to verify table SCOTT.HTZ — HTZ.HTZ
本文固定链接: http://www.htz.pw/2014/08/11/dds%e6%95%b0%e6%8d%ae%e5%af%b9%e6%af%94%e6%b5%8b%e8%af%95.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【学习笔记】总结分享一篇关于DDS数据对比测试

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1098.html

Oracle研究中心

关键词:

DDS数据对比测试笔记