This post will take you through the different aspects of the very important Change Data Capture (CDC) feature in the Oracle Database Management System. We will go into the many intricacies of how it evolved to its present form and how Oracle CDC helps in reducing the expense of running database systems and data extraction from the Oracle database.
What is Change Data Capture (CDC)
Before coming to Oracle CDC, it is necessary to understand how Change Data Capture works, regardless of the database system it is being used.
In a nutshell, Change Data Capture is a software pattern that tracks and monitors changes to data made in the source database. Later, based on the records of these changes, users can take necessary action based on them. Further, it is also possible to integrate data through capturing, identifying, and delivering all the changes made to an enterprise database.
What is Oracle Change Data Capture
The primary feature of Oracle CDC is that it allows real-time data integration throughout an organization. It also escalates the speed, performance, and access to databases.
Further, Oracle CDC can perform several intricate replication activities simultaneously without dropping the database performance subject to the use of optimized tools and non-intrusive methodologies. Among these activities are filtering queries from in-production databases to data warehouses, and migrating databases to the cloud.
Oracle CDC also enables the transfer of incremental data (data generated after the last run of migration) from many sources to a data warehouse.
However, what makes this CDC technology of Oracle super-efficient is that while carrying out the transfer, the source database remains fully functional and downtime is not required. This is very useful for large data-driven businesses where shutting down systems even for brief periods can badly affect their operations.
Oracle CDC’s primary function is to preserve and capture the state of the data and hence it is present typically in a data repository platform or a data warehouse environment. It is very easy to set up Oracle CDC through either application logic, physical storage, or even by combining the two.
How Oracle CDC Evolved To Its Present Form
The Oracle CDC feature was first launched by Oracle Corporation as a built-in feature with its 9i version. It tracked and recorded any changes made in databases on user tables. These changes were then stored in change tables and used in Extract, Transfer, and Load (ETL) applications for processing and transferring into other data warehouses and databases.
Unfortunately, this technology worked through triggers based on source databases which slowed down performance and was considered too invasive by DBAs. Oracle worked on this feedback and released another improved version of the Oracle CDC with the 10g version of its database system, naming it Oracle Streams.
This newer version was based on using the redo logs of the source database in combination with the built-in replication tool of Oracle. This was a quantum improvement over the previous version as it could detect and transfer changes made in the source database to the target database without lowering the efficiency and speed of the source systems.
Even though this version of Oracle CDC was very well received, Oracle Streams was surprisingly discontinued from the 12c version of the Oracle database system. Instead, users now had to pay for Oracle GoldenGate to get this feature or opt for other Oracle tools for replication and CDC.
Oracle CDC In Its Present Form
We have seen that the concept of Oracle CDC is quite simple. The feature tracks and monitors changes made to data in the source database and the target database takes specific action based on those changes. It is not necessary for the source and the target databases to be different for Oracle CDC to function, it works equally well when both are the same.
The Oracle Data Integrator is the driving force in the functioning of the Oracle CDC. It identifies changes made to the data in the source database that is used for other applications. The integrator also supports two forms of journalizing modes.
- Simple Journalizing Mode: All changes made to individual data stored in a system are monitored by Oracle CDC.
- Consistent Set Journalizing Mode: In this mode, Oracle CDC first considers the referential integrity between the data stores before tracking any change made to the data.
In both instances, DBAs can effortlessly set up the above modes on an Oracle Data Integrator.
What Are The Benefits Of Using Oracle CDC
Why should you use Oracle CDC over any other tool having the same functions? Here are some key benefits of Oracle Change Data Capture.
- Oracle CDC captures all changes such as Insert, Delete, and Update along with the values before and after the changes.
- CDC packages publish and subscribe interfaces such as DBMS_CDC_PUBLISH and DBMS_CDC_SUBSCRIBE
- Since the extraction of changed data from the Oracle database is seamlessly carried out, Oracle CDC substantially reduces expenses for database maintenance.
What Are The Types of Oracle CDC
There are two types of Oracle Change Data Capture.
- Synchronous CDC: In this type of Oracle CDC, triggers are placed on records in a change table and are activated whenever a change takes place. Though effective, the downside here is that triggers often dampen the speed and performance of the databases.
- Asynchronous CDC: Here, only after a SQL statement performs a DML activity will redo files receive data and any changes made to data will be captured. The various types of Asynchronous CDC are HotLog, Distributed HotLog, and AutoLog.
The Oracle CDC feature has over the years greatly helped organizations carry out data replication and migration activities smoothly and optimally.