CHGREPMTD - Change replication method

Use this command to change the replication method of a source table in a subscription.

If you want to change the replication method of multiple source tables, then you need to issue this command for each one. You can change the replication method for individual source tables, generic groups source tables, or all source tables within a library.

Applies To—Source

Parameters

Table 1. Supported keywords
Keyword Description Choices Notes
TARGET Subscription name Name Required
TABLE Source table name Qualified object name Required
Qualifier 1: Source table name Name, generic*, *ALL
Qualifier 2: Library Name
REPMTD Replication method *REFRESH, *MIRROR Required
UPDMTD Update method *KEYED, *RRN Required

Subscription name (TARGET)

Specifies the name of the subscription to which the source table belongs.

This is a required parameter.

Name
Specify the name of a subscription. This must be the same name defined in Management Console.

Source table name (TABLE)

Specifies the name of the source table.

This is a required parameter.

Qualifier 1: Source table name
Name
Specifies the name of a table
generic*
Generic names may be used for tables, by adding an asterisk (*) after one or more characters that are common to the group of table names. For example, 'abc*' specifies all tables starting with the characters 'abc'.
*ALL
Specifies all tables.
Qualifier 2: Library
Name
Specifies the library where the table resides.

Replication method (REPMTD)

Specifies the replication method that you want to use.

This is a required parameter.

*REFRESH
Specifies replication by refresh.
*MIRROR
Specifies replication by mirroring.

Update method (UPDMTD)

Specifies the update method to be used by CDC Replication when applying data to the target.

This is a required parameter.

*KEYED
Specifies that CDC Replication will apply data using unique keys.
*RRN
Specifies that CDC Replication will apply data using relative record numbers.

Result

The next time you start replication, CDC Replication applies data using the new replication method. When you issue this command, you should see the appropriate messages in the Event Log.

Examples

CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/CUSTOMER) REPMTD(*REFRESH) UPDMTD(*KEYED)

The source table CUSTOMER (in library DTUTOR) has its replication method changed to *REFRESH in the subscription (SUB1).CDC Replication will update the target table using unique keyed access paths. Since the replication method is *REFRESH, this parameter is not applicable in this command invocation.

CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/*ALL) REPMTD(*MIRROR) UPDMTD(*KEYED)

All source tables (in library DTUTOR) have their replication methods changed to *MIRROR in the subscription (SUB1). CDC Replication will update the target table using unique keyed access paths.

CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/SALES) REPMTD(*MIRROR) UPDMTD(*RRN)

The source table SALES (in library DTUTOR) has its replication method changed to *MIRROR in the subscription (SUB1). CDC Replication will update the target table using its relative record number.