1. Configure an OGG environment with pump on the source side and trail on the target side
1.1 Parameter file
Extract process ett parameters:
EXTRACT ett
USERID System, PASSWORD Oracle
Exttrail./dirdat/tr
TABLE Gguser.huangliqiang, where (ID = 100);
Data pump process DPP parameters:
EXTRACT DPP
USERID System, PASSWORD Oracle
Rmthost 192.168.1.29, Mgrport 7809
Rmttrail./dirdat/tr
TABLE Gguser.huangliqiang;
Target-side Replicat process RPP:
Replicat RPP
USERID System, PASSWORD Oracle
Handlecollisions
Assumetargetdefs
Discardfile./dirrpt/rorakk. DSC, PURGE
MAP Gguser.huangliqiang, TARGET Gguser.huangliqiang;
1.2 Adding process and trail files
Add extract Ett,tranlog,begin Now
Add Exttrail./dirdat/tr,extract ett
Add extract Dpp,exttrailsource./dirdat/tr
Add Rmttrail./dirdat/tr,extract DPP
Add Replicat rpp,exttrail/dirdat/tr, checkpointtable system.ggchkptable
2. Filtering
2.1 Extract parameter row filter (compare symbols < spaces on both sides, which is prone to error):
Table HR. EMPLOYEES,
WHERE (employee_id < 100);
2.2 Table columns in different cases of mapping, mainly to generate the source-side table structure of the definition file DEFGEN.PRM, and then in the target-side colmap mapping,
On the target side of the Colmap, the table field on the target side is written on the left, and the source side is written on the right:
Edit params Defgen
Defsfile/u01/gg/dirdef/hunterdef01.defs
USERID System, PASSWORD Oracle
TABLE GGUSER.HLQ;
$ Defgen PARAMFILE/U01/GG/DIRPRM/DEFGEN.PRM
Send def files to the Dirdef directory on the target side
SCP./dirdef/hunterdef01.defs [Email Protected]:/u01/gg/dirdef
The rep parameter is added
Replicat Rorakk
USERID System, PASSWORD Oracle
Handlecollisions
--assumetargetdefs
Discardfile./dirrpt/rorakk. DSC, PURGE
--map Gguser.tcustmer, TARGET Gguser.tcustmer;
--map Gguser.tcustord, TARGET Gguser.tcustord;
Sourcedefs/u01/gg/dirdef/hunterdef01.defs
MAP GGUSER.HLQ, TARGET Gguser.hunter,
Colmap (Usedefaults,xingming=name);
3. Process maintenance:
Delete extract, data pump, replicat process, to be logged in with Ogg synchronization user,
The removal process is typically used to reconstruct the synchronization environment, and the delete process does not delete the parameter file, which can be deleted manually
Delete ext ett;
Delete Rep RPP;
Process modification:
Alter extract ett extseqno 0753, Extrba 0
Start ett;
This article is from the "Oracle World of Hunter" blog, please contact the author!
Oracle Goldengate Maintenance