Oracle 11g Change Data Capture and CSCN$

Hi Everyone,
I'm running Synchronous CDC in an all Oracle 11g environment. Looking in the PUBLISHER tables, I noticed something odd regarding the Oracle generated CSCN$ and COMMIT_TIMESTAMP$ columns. For some of the records, these values are set to:
CSCN$,                  COMMIT_TIMESTAMP$
281474976710655    01-JAN-00 00:00:00
281474976710655    01-JAN-00 00:00:00
These values never get picked up by the SUBSCRIBER, as the VIEW has a predicate to capture changes within a range far less than the above, ie:
CSCN$,             
COMMIT_TIMESTAMP$
10424608850601    03-JAN-14 10:54:05
10424608850601    03-JAN-14 10:54:05
So I'm wondering, why is Oracle insert those odd CSCN$ and TIMESTAMP values? Is it possibly records that have been UPDATED from source but the original INSERT of the record wasn't picked up by CDC. I'm not sure how CDC deals with UPDATES after the records have been INSERTED on the source but before CDC was 'turned on'?
Thanks for any help!
-Steve

Hi,
you can use dbms_streams.set_tag to hide transactions from replication.
see: http://docs.oracle.com/cd/E11882_01/server.112/e10705/rep_tags.htm#STREP390
sample:
BEGIN
DBMS_STREAMS.SET_TAG( tag => HEXTORAW('1D'));
delete from my_table where column1 = 1;
commit;
DBMS_STREAMS.SET_TAG( tag => null);
END;
the apply tag has to be another than is set to your apply process.
therefore first determine the actual tag for your session:
SET SERVEROUTPUT ON
DECLARE
raw_tag RAW(2048);
BEGIN
raw_tag := DBMS_STREAMS.GET_TAG();
DBMS_OUTPUT.PUT_LINE('Tag Value = ' || RAWTOHEX(raw_tag));
END;
first try with a sample...
kind regards
johann.

Similar Messages

  • Oracle 11g Change data Capture

    We have setup a change data capture on Oracle 11gR2. the records that get changed in the source tables will get captured in the change tables. I have some unnecessary rows in the source tables, which i would like to eliminate them without replicating the changes to target table. i know the key values to identify the rows that got populated in the change table and can manually delete it. Is there any known/unknown side affects to eliminate the records from the change table.

    Hi,
    you can use dbms_streams.set_tag to hide transactions from replication.
    see: http://docs.oracle.com/cd/E11882_01/server.112/e10705/rep_tags.htm#STREP390
    sample:
    BEGIN
    DBMS_STREAMS.SET_TAG( tag => HEXTORAW('1D'));
    delete from my_table where column1 = 1;
    commit;
    DBMS_STREAMS.SET_TAG( tag => null);
    END;
    the apply tag has to be another than is set to your apply process.
    therefore first determine the actual tag for your session:
    SET SERVEROUTPUT ON
    DECLARE
    raw_tag RAW(2048);
    BEGIN
    raw_tag := DBMS_STREAMS.GET_TAG();
    DBMS_OUTPUT.PUT_LINE('Tag Value = ' || RAWTOHEX(raw_tag));
    END;
    first try with a sample...
    kind regards
    johann.

  • Oracle 11g Active Data Guard and SAP R3

    Hi All,
    I have a query regarding Oracle 11g Active Data Guard and SAP R3.
    Does the Oracle 11g R1/R2 Active Data guard feature supported with SAP R3?
    I appreciate your help to provide any link or document for the same.
    Thanks,
    Vihang

    I have a query regarding Oracle 11g Active Data Guard and SAP R3.
    Does the Oracle 11g R1/R2 Active Data guard feature supported with SAP R3?
    I appreciate your help to provide any link or document for the same.
    Oracle database 11g functionality certified by SAP, check below link
    http://www.oracle.com/us/solutions/sap/oradb11g-article-upd-1-323074.pdf
    http://www.oracle.com/technetwork/middleware/ias/downloads/osb-11gr1certmatrix.xls

  • Change Data Capture: Unsubscribed column results in new change set record

    I have an installation using Oracle 11g Change Data Capture in synchronous mode. As of writing, I have a single publication and a single subscription. The setup is pretty basic:
    PUB_TABLE
    PUB_ID*
    PUB_NAME*
    PUB_USELESS_FLAG
    * columns are included in both the PUBLICATION and the SUBSCRIPTION. The final column is of no consequence and is excluded from both the PUBLICATION and SUBSCRIPTION.
    My problem is that any time PUB_USELESS_FLAG gets updated (even if no other columns are changed), a record is written to not only the change table but the change table view. The table in question has a significant number of transactions logged against it, but only a subset of those changes are of note to the subscriber (which is why the subscriber does not listen to every column). However, since the subscription is receiving records for every change to the source table, the result is an enormous amount of overhead as the subscriber is forced to sift through numerous records that are of no consequence.
    I read the Change Data Capture manual for Oracle 11g; I could not find any reference to the observed functionality. Is this a consequence of using synchronous vs. asynchronous modes of capture? Is there an option to only receive changes on subscribed columns?
    Thanks in advance

    Bring this to the top because I have the same question. This website (http://www.bikinfo.com/HTML/CDC/CDC_Article.html) makes it sound like this problem is unavoidable.
    Edited by: nik_m on Nov 10, 2011 8:04 AM
    Edited by: nik_m on Nov 10, 2011 8:05 AM

  • Query on Change Data Capture

    Hi,
    A small clarification on oracle CDC(change data capture),if the CDC is down for 6 hours due to some issues how do I capture all the source transactions into CDC views during this window?
    Just doing a purge and restarting the CDC Subscriber would solve the above scenario?
    Thanks

    Oracle CDC is all about capturing changes in DB tables and the changes are stored in special Oracle tables. There are two modes of CDC operation: asynchronous (based on Java) or synchronous (based on DB triggers, more performance overhead).
    Check
    http://docs.oracle.com/cd/B13789_01/server.101/b10736/cdc.htm#i1025409
    http://docs.oracle.com/cd/E14571_01/integrate.1111/e12643/data_capture.htm

  • CDC (Change Data Capture) with 2 Tables

    Hello,
    i want to use the change data capture for the typical Data Warehousing progress (bring the new or updatet table from source to the staging area)
    So i have implemented a mapping with to tables. The source table is S_Account, the target or staging table is W_Account_DS.
    I have connected/mapped the tables and in the next step i goes into property inspector of W_ACCOUNT_DS into the Area Change Data Capture --> Change Data Capture Filter and put into the follow expression Builder
    Select *
    from S_Acccount
    where INOUTGRP1.LAST_UPD_DT = CURRENT_DATE (<-- Validation Succesful)
    and the next Step i make Enabeled is true in the Change Data Capture Area. So i think it should ready for one test case.
    I set in SQL Developer with an update statement the LAST_UPD_DT at 28.03.2012 in this case he should not update/insert anything, right? But he insert the full table.
    I set in SQL Developer with an update statement the LAST_UPD_DT by 2 Columms to 28.03.2012 in this case he should update he should update the full table - 2 columns with the date 28.03.2012, right?
    So what make i wrong or have i forgotten anything? (must set keys by the tables? I think not! If yes why?)
    Must i set anything properties else? Why doesnt´work it?
    I look forward for your replies :)

    Setting up CDC is a fairly complex process with different options. Setting just the filter in OWB is only a very small part.
    There is a blog post below on how to use code templates to do CDC which gives some insight;
    http://www.rittmanmead.com/2009/10/changed-data-capture-and-owb11gr2/
    Plus and older one illustrating how to use Oracle logs;
    http://www.rittmanmead.com/2006/04/asynchronous-hotlog-distributed-change-data-capture-and-owb-paris/
    Cheers
    David

  • Change Data Capture,Change Tables

    Hi,
    We installed Change Data Capture in our DB (10gR2),however there is a problem with change tables.Change tables are being cleaned somehow.According to text quoted below,the job which is cleaning change tables is cdc$_default_purge_job.However
    select log_date
    +, job_name+
    +, status+
    from dba_scheduler_job_log
    where job_name='CDC$_DEFAULT_PURGE_JOB';
    results no data. Also this morning i came across that data cleansing again, and run the query below.And again no result.
    select job_name
    +, session_id+
    +, running_instance+
    +, elapsed_time+
    +, cpu_used+
    from dba_scheduler_running_jobs;
    /*We didn't even use DBMS_SCHEDULER.SET_ATTRIBUTE procedure so far*/
    What is cleaning change tables and how can i control it?
    Tnx in advance
    Quotation:
    Change Data Capture creates a purge job using the
    DBMS_SCHEDULER package (which runs under the account of the publisher who created the first change table). This purge job calls the
    DBMS_CDC_PUBLISH.PURGE procedure to remove data that subscribers are no longer using from the change tables. This job has the name
    cdc$_default_purge_job. By default, this job runs every 24 hours. You can change the schedule of this job using
    DBMS_SCHEDULER.SET_ATTRIBUTE and set the
    repeat_interval attribute. You can verify or modify any other attributes with the
    DBMS_SCHEDULER package.

    Setting up CDC is a fairly complex process with different options. Setting just the filter in OWB is only a very small part.
    There is a blog post below on how to use code templates to do CDC which gives some insight;
    http://www.rittmanmead.com/2009/10/changed-data-capture-and-owb11gr2/
    Plus and older one illustrating how to use Oracle logs;
    http://www.rittmanmead.com/2006/04/asynchronous-hotlog-distributed-change-data-capture-and-owb-paris/
    Cheers
    David

  • Change Data Capture Data lost

    Hi,
    I'm using Oracle Database 10g (10.1.0.5) and i have been using Oracle's Change Data Capture utility to track changes in tables. The tracking table is created and it captures the changes made too, but the next day, the data is lost. Is there any reason why this happens? I'm clueless

    I read somewhere that the CDC is saved using the Redo Log and if the DB is not in Archive mode, CDC data will be lost the next day. Has anyone faced such problems?

  • Can you help me about change data captures in 10.2.0.3

    Hi,
    I made research about Change Data Capture and I try to implement it between two databases for two small tables in 10g release 2.MY CDC implementation uses archive logs to replicate data.
    Change Data Capture Mode Asynchronous autolog archive mode..It works correctly( except for ddl).Now I have some questions about CDC implementation for large tables.
    I have one senario to implement but I do not find exactly how can I do it correctly.
    I have one table (name test) that consists of 100 000 000 rows , everyday 1 000 000 transections occurs on this table and I archive the old
    data more than one year manually.This table is in the source db.I want to replicate this table by using Change Data Capture to other stage database.
    There are some questions about my senario in the following.
    1.How can I make the first load operations? (test table has 100 000 000 rows in the source db)
    2.In CDC, it uses change table (name test_ch) it consists of extra rows related to opearations for stage table.But, I need the orjinal table (name test) for applicaton works in stage database.How can I move the data from change table (test_ch) to orjinal table (name test) in stage database? (I don't prefer to use view for test table)
    3.How can I remove some data from change table(name test_ch) in stage db?It cause problem or not?
    4.There is a way to replicate ddl operations between two database?
    5. How can I find the last applied log on stage db in CDC?How can I find archive gap between source db and stage db?
    6.How can I make the maintanence of change tables in stage db?

    Asynchronous CDC uses Streams to generate the change records. Basically, it is a pre-packaged DML Handler that converts the changes into inserts into the change table. You indicated that you want the changes to be written to the original table, which is the default behavior of Streams replication. That is why I recommended that you use Streams directly.
    <p>
    Yes, it is possible to capture changes from a production redo/archive log at another database. This capability is called "downstream" capture in the Streams manuals. You can configure this capability using the MAINTAIN_* procedures in DBMS_STREAMS_ADM package (where * is one of TABLES, SCHEMAS, or GLOBAL depending on the granularity of change capture).
    <p>
    A couple of tips for using these procedures for downstream capture:
    <br>1) Don't forget to set up log shipping to the downstream capture database. Log shipping is setup exactly the same way for Streams as for Data Guard. Instructions can be found in the Streams Replication Administrator's Guide. This configuration has probably already been done as part of your initial CDC setup.
    <br>2) Run the command at the database that will perform the downstream capture. This database can also be the destination (or target) database where the changes are to be applied.
    <br>3) Explicitly define the parameters capture_queue_name and apply_queue_name to be the same queue name. Example:
    <br>capture_queue_name=>'STRMADMIN.STREAMS_QUEUE'
    <br>apply_queue_name=>'STRMADMIN.STREAMS_QUEUE'

  • Upgrade of Database with Oracle Change Data Capture

    Hello,
    We are upgrading and moving our database to a different server.
    The move is from 10G R1 database on Solaris to 11G R2 on Linux.
    Our database uses Oracle Change Data Capture.
    What is the best way to perform this migration? Unlike in the approach below, ideally, it would be without any manual steps to drop and recreate CDC subscriptions, change tables, etc.
    Thanks.
    Considerations for Exporting and Importing Change Data Capture Objects
    http://docs.oracle.com/cd/B13789_01/server.101/b10736/cdc.htm#i1027532
    Starting in Oracle Databse 10g, Oracle Data Pump is the supported export and import utility for Change Data Capture. Change Data Capture change sources, change sets, change tables, and subscriptions are exported and imported by the Oracle Data Pump expdp and impdp commands with the following restrictions:
    After a Data Pump full database import operation completes for a database containing AutoLog Change Data Capture objects, the following steps must be performed to restore these objects:
    1. The publisher must manually drop the change tables with the SQL DROP TABLE command. This is needed because the tables are imported without the accompanying Change Data Capture metadata.
    2. The publisher must re-create the AutoLog change sources, change sets, and change tables using the appropriate DBMS_CDC_PUBLISH procedures.
    3. Subscribers must re-create their subscriptions to the AutoLog change sets.

    Hello,
    I opened SR with Oracle Support, they are suggesting to perform full database import/export
    Change Data Capture change sources, change sets, change tables, and subscriptions are exported and imported by the Oracle Data Pump expdp and impdp commands with the following restrictions.
    Change Data Capture objects are exported and imported only as part of full database export and import operations (those in which the expdp and impdb commands specify the FULL=y parameter). Schema-level import and export operations include some underlying objects (for example, the table underlying a change table), but not the Change Data Capture metadata needed for change data capture to occur."
    CDC has different implementation methods:
    You may use the below query to determine-
    select SOURCE_NAME, SOURCE_DESCRIPTION, CREATED, SOURCE_TYPE, SOURCE_DATABASE, SOURCE_ENABLED from change_sources;
    – Synchronous CDC: with this implementation method you capture changes
    synchronously on the source database into change tables. This method uses
    internal database triggers to enable CDC. Capturing the change is part of the
    original transaction that introduces the change thus impacting the performance
    of the transaction.
    – Asynchronous Autolog CDC: this implementation method requires a staging
    database separate from the source database. Asynchronous Autolog CDC uses
    the database's redo transport services to transport redo log information from
    the source database to the staging database1. Changes are captured at the
    staging database. The impact to the source system is minimal, but there is some
    latency between the original transaction and the change being captured.
    As suggested in the document-
    Change Data Capture objects are exported and imported only as part of full database export and import operations (those in which the expdp and impdb commands specify the FULL=y parameter). Schema-level import and export
    operations include some underlying objects (for example, the table underlying a change table), but not the Change Data Capture metadata needed for change data capture to occur.
    ■ AutoLog change sources, change sets, and change tables are not supported.
    Starting in Oracle Database 10g, Oracle Data Pump is the supported export and import utility for Change Data Capture.
    Re-Creating AutoLog Change Data Capture Objects After an Import Operation
    http://docs.oracle.com/cd/B19306_01/server.102/b14223/cdc.htm#i1027532
    After a Data Pump full database import operation completes for a database containing AutoLog Change Data Capture objects, the following steps must be performed to restore these objects:
    a. The publisher must manually drop the database objects underlying AutoLog Change Data Capture objects.
    b. The publisher must re-create the AutoLog change sources, change sets, and change tables using the appropriate DBMS_CDC_PUBLISH procedures.
    c. Subscribers must re-create their subscriptions to the AutoLog change sets.

  • Change Data Capture for Oracle 9i

    <p>If your environment must keep large amounts of data current, the Oracle CDC feature is a simple solution to limiting the number of rows that Data Integrator reads on a regular basis. A source that reads only the most recent operations (INSERTS, UPDATES, DELETES), allows you to design smaller, faster delta loads.</p><p>With Oracle 9i, Data Integrator manages the CDC environment by accessing Oracle&#39;s CDC packages. Oracle publishes changed data from the original table to its CDC table. After a CDC table receives published data, you can create subscriptions to access the data. Data Integrator Designer allows you to import CDC tables and create subscriptions for them.</p><p>For more information see "Techniques for Capturing Changed Data" of the Data Integrator Designer Guide.</p>

    <p>Werner did a nice step-by-step instruction on how to set up CDC in Oracle and use this inside Data Integrator. </p><p><a href="http://www.consulting-accounting.com/time/servlet/ShowPage?COMPANYID=43&ELEMENTID=1641" target="_blank">http://www.consulting-accounting.com/time/servlet/ShowPage?COMPANYID=43&ELEMENTID=1641</a></p>

  • Is it possible ?Change data capture from VSAM , DB2 , SQL Server  to Oracle

    Dear Professionals ,
    We plan to build a warehouse project.Source systems are
    * VSAM files in zOS
    * SQL Server
    * DB2
    Warehouse database is Oracle .
    Every night the changes in the source systems will be applied to Oracle warehouse DB.
    But only the changes will be applied . Exporting VSAM files to flat file and load to oracle and find the data differences in Oracle is not accepted. Or moving the entire tables to oracle and finding the changes in oracle is not accepted.Only the changes will pass through the network .
    Is "Oracle Connect" and "VSAM adaptor" capable of this ?
    Is there a solution for SQL Server and DB2 change data capture ?
    Is it Possible ? If possible is it a headache or a simple install and forget process?
    Thank you
    Bunyamin..

    Bunyamin,
    I do not know about VSAM, but I heard/read that Oracle Data Integrator is able to do change data capture on several databases. It uses the source database mechanism to do CDC. So maybe give it a try at the fusion middleware forum where ODI is being discussed

  • SQL Server 2012 Change Data Capture for Oracle by Attunity support for Oracle 12

    I would like to know if there are any plans for SQL Server 2012 Change Data Capture for Oracle by Attunity to support versions of Oracle 12 and if by when.

    I have asked from the author of
    http://blogs.msdn.com/b/mattm/archive/2012/03/26/cdc-for-oracle-in-sql-server-2012.aspx about this.
    I will either ask him to answer here or I would be a messenger.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Oracle Changed Data Capture

    Hello,
    Can any one help me out how do we create Oracle Changed Data Capture in oracle 9i

    The keyword to search for is Streams which is the Oracle option implementing change data capture.
    See Single Database Capture and Apply Example in Oracle9i Streams: http://download.oracle.com/docs/cd/B10501_01/server.920/a96571/capappdemo.htm#64404

  • Change data capture-staging table

    hi,
    while using change data capture in oracle 11g,r2.I used source table and target table in the mapping.[ both source and target are oracle].
    Do i have to use staging table for the mapping ,instead of target table.??
    if yes, then where and how do i create a staging table and put it in the code template mapping.
    Do i have to enable cdc in property editor for both the source and target tables?

    Could you explain your requirement?
    Where does change take place?

Maybe you are looking for