5.7.1. How Oracle Extraction Works

When replicating to Oracle, row data extracted from the source database is applied to the target database as an Oracle database user using SQL statements to insert the row based data. A combination of the applier class for Oracle, and filters, are used to format the row events into suitable statements.

When replicating from Oracle, changes to the database are extracted using the Oracle Change Data Capture (CDC) system. Support is available for using Synchronous and Asynchronous CDC according to the version of Oracle that is being used:

Edition Synchronous CDC Asynchronous CDC
Standard Edition (SE) Yes No
Enterprise Edition (EE) Yes Yes
Standard Edition 1 (SE1) Yes No
Express Edition (XE) No No

Both CDC types operate through a series of change tables. The change tables are accessed by subscribers which read information from the change tables to capture the change data. The method for populating the change tables depends on the CDC method:

  • Synchronous CDC

    Figure 5.9. Oracle Extraction with Synchronous CDC

    Oracle Extraction with Synchronous CDC

    Within Synchronous CDC, triggers are created on the source tables which are configured to record the change information into the change tables. Subscribers to the change tables then read the information. With Tungsten Replicator, the replicator acts as the subscriber, reads the change information and populates the change data into the THL used by the replicator. Because the information is extracted from the tables being updated using triggers, there is an overhead for the Synchronous CDC mode for all database operations while the triggers are executed.

    In addition, because the changes are captured within the transaction boundary, the information is exposed within the CDC tables quicker. The synchronous CDC can therefore be quicker than asynchronous CDC.

  • Asynchronous CDC

    Figure 5.10. Oracle Extraction with Asynchronous CDC

    Oracle Extraction with Asynchronous CDC

    With Asynchronous CDC, information is taken from the Oracle redo logs and placed into the change tables. These changes are dependent on the supplemental logging enabled on the source database. Supplemental logging adds redo logging overhead, which increases the redo log size and management requirements. Tungsten Replicator uses Asynchronous HotLog mode, which reads information from the Redo logs and writes the changes into the change data tables.

In both solutions, Tungsten Replicator reads the change data generated by the Oracle CDC system in the CDC table. The change data is extracted from these tables and then written into THL so that it can be transferred to another replicator and applied to another supported database.

Note

More information on Oracle CDC can be found within the Oracle documentation.