I´m trying to replicate transactions from one table to other. For example, at destination, if I insert into a table t5, the insert is replicated to t5 at target. What I want is a second map (or whatever) which executes again the same operation against other table t6, like a trigger. The insert works, the update doesn´t because the update operations is done for the columns which is the PK and it is an error , a bug, which can be solved setting the constraint to deferrable at target site and setting the map with HANDLETPKUPDATE. However, when I try to re-execute the same update against t6 it fails.
The replicat code is very simple:
TABLEEXCLUDE scott.t6; --> This is to disable operations against t6 from source
map scott.t*, target scott.* ,HANDLETPKUPDATE;
map scott.t5, target scott.t6 ,HANDLETPKUPDATE;
map scott.t5 #exception_handler();
map scott.t6 #exception_handler();
But there is an error:
ORA-00001: unique constraint (SCOTT.PK_T5) violated), SQL<Not available>.
And, although I set the reperror like this:
REPERROR (DEFAULT, EXCEPTION)
REPERROR (DEFAULT2, EXCEPTION)
The process abends.
Does anyone know why it fails?.
Problem solved, I have found a solution creating an additional replicat process which only maps the tables t5 and t6. I don´t know what is the internal processing of GoldenGate but the it can´t execute the two map under the same replicat process so it is needed to separate them, at least this is my found solution.