How to skip a transaction in replicate(Target system) in Goldengate oracle -
requirement:
source table contains 5 columns. replicating 3 columns on target out of 5. seq_id additional column on target.
when update operation performed on columns not in target table,seq_id increased. seq_id should increase when update performed on columns present on target.
enabling unconditional supplemental table level logging on selected columns(id,age,col1) replicated:
source: table name: test1(id,age,col1,col2,col3)
target: table name: test1(id,age,col1,seq_id)
we created sequence increse seq_id when insert or update happens.
scenario : if insert or update happens on source table on these columns (id,age,col1) seq_id incresed, , if update happens on others columns(col2,col3) seq_id getting incremented.
our requirement when update happens on others columns(col2,col3) ,seq_id should not incrementd. want skip transaction of updates happening on columns(col2,col3) .
source: primary extract test_e1 extract test_e1 userid dbtuat_gg,password dbt_1234 exttrail /db_track_gg/ggs/dirdat/dd getupdatebefores --ignoreupdates --ignoredeletes nocompressupdates table hari.test1,cols(id,age,col1),filter (on update,ignore update, @streq(before.age, age) = 0);
datapump test_p1: extract test_p1 userid dbtuat_gg,password dbt_1234 rmthost 10.24.187.235, mgrport 7809,
rmttrail /trail_files/tt --passthru table dbtuat_gg.test1;
target: target repicat file: edit param test_r
replicat test_r userid ggprod,password ggprod_123 sourcedefs ./dirsql/def32.sql handlecollisions ignoredeletes insertmissingupdates map hari.test1, target hari.test1, & sqlexec (id test_num,query "select ggprod.test_seq.nextval test_val dual", noparams), & colmap(usedefaults,seq_id=test_num.test_val);
kindly suggest possible solutions .
first note: don't need userid , password in pump prm. pump process not connect database.
actually have achieved goal. replicating data when age modified. there filter clause in extract prm file. id column should not changed since pk. problem increasing seq_id if delete gets replicated.
something should work:
allowduptargetmap ignoredeletes -- inserts , updates change col1 map hari.test1, target hari.test1, & sqlexec (id test_num,query "select ggprod.test_seq.nextval test_val dual", noparams), & colmap(usedefaults, seq_id = test_num.test_val); -- replicate delete operations getdeletes ignoreinserts ignoreupdates map hari.test1, target hari.test1; getinserts getupdates
Comments
Post a Comment