Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[CDC] Change Data Capture: disable capture for a column in change table

889120Sep 19 2011 — edited Sep 21 2011
Hi experts,

I'm using Synchronous Change Data Capture on 11gR2. I'm facing an issue on tracked columns. I need to exclude somes columns from being captured in my change table.

This is my source table:
CREATE TABLE DEPT (Code INTEGER NOT NULL ENABLE,
                    Name VARCHAR2(400 BYTE) NOT NULL,
                    Salary NUMBER(*,2) NOT NULL,
                    CONSTRAINT PK_CODE PRIMARY KEY (Code));
and I only want to see changes on Code, Name but not Salary.

This is my Change Table definition:
BEGIN
   DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE(
    owner             => 'cdcpub',
   change_table_name => 'dept_ct', 
   CHANGE_SET_NAME   => 'CHG_SET_DEPT',
   source_schema     => 'my_user',
   source_table      => 'DEPT',
   column_type_list  => 'CODE INTEGER, NAME VARCHAR2(400 CHAR)', 
   capture_values    => 'both',
   rs_id             => 'y', 
   row_id            => 'y',
   user_id           => 'y',
   timestamp         => 'y',
   object_id         => 'N',
   source_colmap     => 'y',
   target_colmap     => 'y',
   options_string    => NULL,
   DDL_MARKERS       => 'n');
END;
When I do:
UPDATE DEPT SET Salary=300000 WHERE CODE=77;
I don't want to see a row for this update in my change table. Is there a way to do this with Oracle CDC or changes are only tracked at table level and not at column's...



Thanks in advance!

Edited by: Salah on Sep 20, 2011 10:11 AM
This post has been answered by 32685 on Sep 21 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2011
Added on Sep 19 2011
13 comments
1,206 views