Table of Contents

Search

  1. Preface
  2. Data Replication Overview
  3. Understanding Data Replication
  4. Sources - Preparation and Replication Considerations
  5. Targets - Preparation and Replication Considerations
  6. Starting the Server Manager
  7. Getting Started with the Data Replication Console
  8. Defining and Managing Server Manager Main Servers and Subservers
  9. Creating and Managing User Accounts
  10. Creating and Managing Connections
  11. Creating Replication Configurations
  12. Materializing Targets with InitialSync
  13. Scheduling and Running Replication Tasks
  14. Implementing Advanced Replication Topologies
  15. Monitoring Data Replication
  16. Managing Replication Configurations
  17. Handling Replication Environment Changes and Failures
  18. Troubleshooting
  19. Data Replication Files and Subdirectories
  20. Data Replication Runtime Parameters
  21. Command Line Parameters for Data Replication Components
  22. Updating Configurations in the Replication Configuration CLI
  23. DDL Statements for Manually Creating Recovery Tables
  24. Sample Scripts for Enabling or Disabling SQL Server Change Data Capture
  25. Glossary

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:
  • For Oracle sources, use
    ALTER TABLE
    table_name
    ADD SUPPLEMENTAL LOG GROUP IDR_
    supplental_log_group_name
    (
    column_list
    ) ALWAYS;
  • For DB2 sources, use
    db2 alter table table_name data capture changes
  • For Microsoft SQL Server sources, use
    execute sp_cdc_enable_table '
    schema_name
    ', '
    table_name
    ', '
    cdc_capture_instance_name
    ', null, null, null, null, null, 1
For more information about managing supplemental logging, see Managing Database Supplemental Logging or the
Data Replication Command Line Interface for the Server Manager
.

0 COMMENTS

We’d like to hear from you!