Ask Your Question
1

Oracle CDC to always create records

asked 2019-07-12 08:45:41 -0500

CaptinCCat gravatar image

updated 2019-07-12 14:04:38 -0500

metadaddy gravatar image

Hi Everyone, i am working to try document every change that happens to a table.

I have CDC working where when one table is edited it edits the same thing in another table.

However i am trying to get it to where when table 1 is edited a new record is created in table 2 instead of updating the existing record

Any thoughts?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-12 14:04:23 -0500

metadaddy gravatar image

The record header attribute sdc.operation.type is set according to the CDC operation:

  • 1 for INSERT records
  • 2 for DELETE records
  • 3 for UPDATE records
  • 4 for UPSERT records
  • 5 for unsupported operations or codes
  • 6 for UNDELETE records
  • 7 for REPLACE records
  • 8 for MERGE records

You can use an Expression Evaluator to always set sdc.operation.type to 1, so the record is inserted into the target table:

image description

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2019-07-12 08:45:41 -0500

Seen: 180 times

Last updated: Jul 12