Logging Supplemental Information for Source Tables Created with Replicated DDL
Logging Supplemental Information for Source Tables Created with Replicated DDL
If you replicate CREATE TABLE operations, you must enable supplemental logging for the new tables to store the additional information that is required for data replication in the source database log files.
You can enable supplemental logging from the Data Replication Console, with Server Manager CLI commands, or in the source database.
Enable supplemental logging before allowing DML changes to be written to the source tables. If you enable supplemental logging after DML changes are written to the tables, the Extractor extracts incomplete change data and the Applier cannot process Updates and Deletes correctly.
In the Data Replication Console, add the new table to the mapping in the replication configuration. When you save the configuration, the Console can enable supplemental logging for the table provided that you set the
Supplemental Logging Settings
field to
Ask
or
Yes
on the
Runtime Settings
tab >
General
view. For Oracle sources, the Data Replication Console generates a supplemental log group for the table if the table has a primary key or unique index. Ensure that the supplemental log group includes the primary key or unique index columns. The generated supplemental log group names have the format IDR_
table_object_ID
_
sequence_number
.
Because Oracle restricts the number of columns in a supplemental log group to 33, the Data Replication Console might generate more than one supplemental log group for a table. For example, a source table with 100 columns has four supplemental log groups: three groups with 33 columns each and one group with one column.
To manually enable or manage supplemental logging for source tables from the Data Replication Console, click the
Manage Database Supplemental Logging
button on the
Map Tables
tab. Depending on the source type, perform one of the following actions:
For DB2 sources, select
Data Capture
for each new source table to set the DB2 DATA CAPTURE CHANGES option.
For Microsoft SQL Server sources, select
CDC
for each new source table to set SQL Server Change Data Capture.
For Oracle sources, select the columns to be included the supplemental log group for each table. If a new Oracle source table does not have primary key or unique index and you did not choose to create a virtual index when you saved the configuration, include all of the table columns in the supplemental log group except those that have the following datatypes:
BLOB
CLOB
LONG
LONG RAW
NCLOB
RAW
Any of the Oracle datatypes that Data Replication does not support for replication
If you create a unique index on a new target table, also add the source columns that correspond to the target index columns to the supplemental log group for the source table. Otherwise, Data Replication might not correctly apply Updates to the unique index columns.
If you want to enable supplemental logging for the new tables from the source database, execute the following SQL statements immediately after creating the source tables: