Столкнулся с тем, что возникла необходимость сравнить большое количество таблиц (более тысячи). Для того чтобы не создавать в группе каждую пару таблиц для сравнения руками, есть следующие инструменты:
https://docs.oracle.com/en/
Однако, при импорте столкнулся с багом описанным здесь:
Veridata_import.sh Hung During The "Updating Groups" Operation (Doc ID 2304398.1)
https://docs.oracle.com/
BUG 26364205 – Veridata_import.sh script hung issue
The issue of Oracle GoldenGate Veridata Veridata_import.sh script hanging after Updating profiles in VERIDATA_server1-diagnostic.log was fixed by adding a new zlib.buffer.flush.size property file to the veridata.cfg file and agent.properties.sample file both on the server side as well as on the agent side. The default value is 1000000.
Пришлось поставить патч, который помог:
Patch 27855432: Oracle GoldenGate Veridata 12.2.1.2.180615 (PS2 BP4) (Cumulative)
Итого, импортирование выполняется следующим образом:
cd ${DOMAIN_HOME}/veridata/bin
./veridata_import.sh -wlport 8830 -wluser veridata -create /tmp/output.xml
+++++
2019-07-09 15:44:00.778 NOTIFICATION Oracle GoldenGate Veridata Scripting - Version 12.2.1.2.180615 OGGVDT_MAIN_PLATFORMS_180601.0601
[OGGV-50007: Enter WebLogic user password :]
2019-07-09 15:44:40.220 NOTIFICATION OGGV-50001 XML configuration is successful
+++++
Экспорт так:
cd ${DOMAIN_HOME}/veridata/bin
./veridata_export.sh -export veridata_export.out -wluser veridata -wlport 8830 -groups SRC_TGT_tables_compare
+++++
2019-07-09 16:44:00.778 NOTIFICATION Oracle GoldenGate Veridata Scripting - Version 12.2.1.2.180615 OGGVDT_MAIN_PLATFORMS_180601.0601
[OGGV-50007: Enter WebLogic user password :]
2019-07-09 16:56:51.550 NOTIFICATION OGGV-50001 XML configuration is successful
+++++
Для того, чтобы сформировать скармливаемый скрипту *.xml файл, набросал небольшой скрипт:
#!/bin/bash
##
## Script will generate xml file which can be used for Veridata importing tool for groups import.
##
#-----------------------------------
# Variables:
#-----------------------------------
input="/home/oracle/input.txt"
output="/home/oracle/output.xml"
group_name="SRC_TGT_tables_compare"
source_conn="SRC"
target_conn="TGT"
profile_name="profile1"
source_schema="USER1"
target_schema="USER1"
#-----------------------------------
# Main
#-----------------------------------
echo "<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE configuration SYSTEM \"configuration.dtd\">
<configuration>
<group name=\"${group_name}\" source-conn=\"${source_conn}\" target-conn=\"${target_conn}\">" > ${output}
while IFS="" read -r p || [ -n "$p" ]
do
value=($(printf "$p" | tr -d '\r\n'))
echo " <compare-pair name=\"${value}=${value}\" source-table=\"${value}\" target-table=\"${value}\" source-schema=\"${source_schema}\" target-schema=\"${target_schema}\" profile-name=\"${profile_name}\"/>" >> ${output}
done < $input
echo " </group>
</configuration>" >> ${output}
===============
Источники:
===============
Veridata_import.sh Hung During The "Updating Groups" Operation (Doc ID 2304398.1)