Oracle Change Data Capture (CDC) Explained
Oracle Change Data Capture (CDC) Explained
Oracle CDC, or Change Data Capture, is a software pattern that monitors all changes made to an Oracle source database, helping users take optimized actions based on those changes. Apart from tracking changes, Oracle CDC also enhances database performance by speeding up data warehousing capabilities and real-time data integration.
Oracle Change Data Capture is also a very efficient tool for replicating databases. Several activities can be carried out using this technology. These include migrating databases to the cloud from on-premises platforms without needing to shut down the source database.
The most important function of Oracle CDC is to capture and preserve the state of data in a data warehouse ecosystem that may be used in any database or data storage system. Users needing to configure Oracle CDC may take the help of application logic, choose a physical storage, or even a combination of the two.
Oracle CDC was first launched by Oracle as an out-of-the-box feature with the 9i version.
It tracked all changes made in source databases, storing them in change tables to be used in ETL (Extract, Transform, Load) applications. This introductory feature worked through triggers that were placed in the source tables.
Unfortunately, this version was not popular as it was quite intrusive and complex. Based on this feedback, a revised Oracle CDC was released with the 10g version called Oracle Streams.
It was based on the redo logs of the source database instead of triggers as before, and the in-built replication tool of Streams. This new tool was very well received, as it could detect change data in a data repository without impacting the speed and performance of the system at the source.
Despite this Oracle CDC software pattern being very well-received, Oracle chose to discontinue it as a built-in feature from its 12c version. Instead, users had no other option but to look for some other Oracle replication tool or pay for Oracle Golden Gate, which has Oracle CDC out of the box.
There are two types of Oracle Change Data Capture.
Synchronous Mode
In this mode, triggers are placed in the source database that capture any change instantly. Every SQL statement has a Data Manipulation Language (DML) activity that is classified as Insert, Update, or Delete actions. The data that has changed is captured as part of the transactions that are responsible for the changed data at source. The Synchronous Oracle CDC is available in the Oracle Standard and the Oracle Enterprise Editions.
Asynchronous Mode
Here, the data is moved to the redo log files, and subsequently, the changes made are captured after the SQL statement is taken through a DML activity. Since the data has not been captured as a component of the transactions that resulted in the changes in the source table, the transactions have no effect on the modified or changed data.