Prerequisites and considerations for replicating DDL changes in a CDC Replication Engine for Db2 Database
Before you begin replicating DDL changes, you should ensure that the following prerequisites and considerations are satisfied.
Prerequisites
The following CDC Replication prerequisites must be satisfied in order to allow DDL replication:
- Both the source and target datastores must be a CDC Replication Engine for Db2® Database version 10.2.1 or later.
- DB2 LUW database must be version 10.1 or later for both the source and target databases.
- The release versions of the DB2 LUW database need to be compatible. The DDL operations that are performed on the source database must be supported on the target database.
- The DB2 LUW user specified during creation of the source and target CDC Replication Engine for Db2 Database instances must be the same.
- The source and target datastores must be different databases. You cannot use the same database as both a source and target datastore.
- The source database must have logging enabled at the schema level for any schema that will be part of a rule set. Ensure that dft_schemas_dcc is set to YES.
- The LOG_DDL_STMTS system parameter in DB2 must be set to YES.
- The physical elements of the source and target datastores must be identical.
- Database encoding (code page) must be identical for the source and target
- When replicating DDL operations for temporal tables, both the temporal table and the history table must be selected for replication. The temporal tables will be replicated with the source managing the history.
Considerations
The following considerations should be understood before you attempt DDL replication:
- A table targeted for DDL replication cannot be involved in any other CDC Replication table mapping. That is to say, you cannot mirror from two different source tables to a single target table.
- Conflict Detection and Resolution is not supported for DDL replication.
- Differential refresh and Refreshing a Subset of Rows are not supported for tables for which DDL operations are being replicated.
- Derived columns and derived expressions are not supported for tables for which DDL operations are being replicated.
- LOB columns are selected from the database at the time of replication using the key or unique index (if any) associated with the source table. Therefore, only the current image of a LOB column field in a source table will be sent at the time of replication. If latency is present for a subscription that is replicating DDL operations and there are changes to the list of columns which make up the key used for searching, the target column may contain a null value until the next DML change on that row. If latency is present and the key of the row changes, the target column may contain a null or incorrect value
- Bidirectional replication is not supported for DDL replication.
- When CDC Replication encounters certain object types that cannot be replicated, such as UDTs (user-defined columns), the table will be parked. You will need to determine if the unsupported table is essential to your replication solution. If you decide that it is not essential, you should modify your rule set to exclude the table. If you determine that the table is essential, the table will have to be dropped, recreated and its structure changed in order to be supported for DDL replication.