My Oracle Support Banner

MAPEXCLUDE in the Replicat Process for Postgresql is not working as expected (Doc ID 2227958.1)

Last updated on JANUARY 31, 2017

Applies to:

Oracle GoldenGate - Version 12.2.0.1.0 and later
Information in this document applies to any platform.

Symptoms

MAPEXCLUDE in the Replicat Process for Postgresql is not working as expected

wildcardresolve immediate
MAP oggs.table_clob102, TARGET ogg.table_clob102, keycols (c_id, c_num) ;
MAPEXCLUDE oggs.table_clob102
MAP oggs.*, TARGET ogg.*;
.
test DML
[case 1]
insert into oggs.table_clob102 values (1, 'Every morning after breakfast',1);
commit;
=> duplicate resolve : There is only one insert DML, but this should not
happen. Two records were inserted in the target table.
--target stats
GGSCI (ora12c.young) 20> stats rtesta latest
Sending STATS request to REPLICAT RTESTA ...
Start of Statistics at 2016-11-21 23:20:13.
Replicating from OGGS.TABLE_CLOB102 to ogg.table_clob102:
*** Latest statistics since 2016-11-21 23:14:56 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 1.00
Replicating from OGGS.TABLE_CLOB102 to ogg.table_clob102:
*** Latest statistics since 2016-11-21 23:14:56 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 1.00
End of Statistics.
.
--target table
testdb=# select * from table_clob102;
c_id | c_lob | c_num
------+-------------------------------+-------
1 | Every morning after breakfast | 1
1 | Every morning after breakfast | 1
(2 rows)
.
--source table
SQL> select * from oggs.table_clob102;
C_ID C_LOB C_NUM
------ -------------------------------- ----------
1 Every morning after breakfast 1
.
[case 2]
update oggs.table_clob102 set c_num = 111 where c_id = 1;
commit;
=> target replicat abended
--report
2016-11-21 23:24:43 ERROR OGG-01296 Error mapping from OGGS.TABLE_CLOB102
to ogg.table_clob102.
--discard
Key column c_lob (1) is missing from update on table ogg.table_clob102
Missing 1 key columns in update for table ogg.table_clob102.
Current time: 2016-11-21 23:24:43
Discarded record from action ABEND on error 0
Aborting transaction on ./dirdat/rt beginning at seqno 44 rba 2100
error at seqno 44 rba 2100
Problem replicating OGGS.TABLE_CLOB102 to ogg.table_clob102
Mapping problem with unified PK update record (target format)...
*
c_id = 1
000000: 31 |1 |
c_num = 1
000000: 31 |1 |
c_id = 1
000000: 31 |1 |
c_lob = Every morning after breakfast
000000: 45 76 65 72 79 20 6d 6f 72 6e 69 6e 67 20 61 66 |Every morning af|
000010: 74 65 72 20 62 72 65 61 6b 66 61 73 74 |ter breakfast |
c_num = 111
000000: 31 31 31 |111 |
*
Process Abending : 2016-11-21 23:24:43
.
Note that in GG 12.2, the engineer can not arbitrarily set the
wildcardresolve option. (See reference guide)
.
TESTCASE STEP-BY-STEP INSTRUCTIONS:
-----------------------------------
wildcardresolve immediate
MAP oggs.table_clob102, TARGET ogg.table_clob102, keycols (c_id, c_num) ;
MAPEXCLUDE oggs.table_clob102
MAP oggs.*, TARGET ogg.*;
.
test DML
[case 1]
insert into oggs.table_clob102 values (1, 'Every morning after breakfast',1);
commit;
=> duplicate resolve : There is only one insert DML, but this should not
happen. Two records were inserted in the target table.
--target stats
GGSCI (ora12c.young) 20> stats rtesta latest
Sending STATS request to REPLICAT RTESTA ...
Start of Statistics at 2016-11-21 23:20:13.
Replicating from OGGS.TABLE_CLOB102 to ogg.table_clob102:
*** Latest statistics since 2016-11-21 23:14:56 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 1.00
Replicating from OGGS.TABLE_CLOB102 to ogg.table_clob102:
*** Latest statistics since 2016-11-21 23:14:56 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 1.00
End of Statistics.
.
--target table
testdb=# select * from table_clob102;
c_id | c_lob | c_num
------+-------------------------------+-------
1 | Every morning after breakfast | 1
1 | Every morning after breakfast | 1
(2 rows)
.
--source table
SQL> select * from oggs.table_clob102;
C_ID C_LOB C_NUM
------ -------------------------------- ----------
1 Every morning after breakfast 1
.
[case 2]
update oggs.table_clob102 set c_num = 111 where c_id = 1;
commit;
=> target replicat abended
--report
2016-11-21 23:24:43 ERROR OGG-01296 Error mapping from OGGS.TABLE_CLOB102
to ogg.table_clob102.
--discard
Key column c_lob (1) is missing from update on table ogg.table_clob102
Missing 1 key columns in update for table ogg.table_clob102.
Current time: 2016-11-21 23:24:43
Discarded record from action ABEND on error 0
Aborting transaction on ./dirdat/rt beginning at seqno 44 rba 2100
error at seqno 44 rba 2100
Problem replicating OGGS.TABLE_CLOB102 to ogg.table_clob102
Mapping problem with unified PK update record (target format)...
*
c_id = 1
000000: 31 |1 |
c_num = 1
000000: 31 |1 |
c_id = 1
000000: 31 |1 |
c_lob = Every morning after breakfast
000000: 45 76 65 72 79 20 6d 6f 72 6e 69 6e 67 20 61 66 |Every morning af|
000010: 74 65 72 20 62 72 65 61 6b 66 61 73 74 |ter breakfast |
c_num = 111
000000: 31 31 31 |111 |
*
Process Abending : 2016-11-21 23:24:43
.
Note that in GG 12.2, the engineer can not arbitrarily set the
wildcardresolve option. (See reference guide)

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.