dmsetreplicationmethod - Set replication method

Use this command to change the replication method for tables in a subscription.

When running this command, CDC Replication changes the status of any Active tables to Refresh.

Note: Before you run this command, you must end replication on the subscription.

Syntax

dmsetreplicationmethod [-I <name>] -r|-m -s <subscription ...> 
-A|-t <schema>.<table> ... [-L <locale>]

Parameters

[-I <name>]
Specifies the name of the CDC Replication instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-m
Specifies that tables will use Mirror (Change Data Capture) as the replication method.
-r
Specifies that tables will use Refresh (Snapshot) as the replication method.
-s <subsciption ...>
Specifies the name of the subscriptions.
To specify multiple subscriptions, list the subscriptions separated by a space.
-A
Specifies that all tables in the subscription will use the indicated replication method.
-t <schema>.<table> ...
Specifies the name of a source table in the subscription that will use the indicated replication method. You must specify the table name in the format schema.table.
To specify multiple tables, list the tables separated by a space.
[-L <locale>]
The name of the locale used for the CDC Replication instance. The default is your machine's locale.

Result

This command returns a value of 0 if the command was successful and a non-zero value if the command fails.

Examples

dmsetreplicationmethod -I MYINSTANCE -r -s FINANCE -A

All tables in the Finance subscription will use Refresh as the replication method in the specified CDC Replication instance.

dmsetreplicationmethod -I MYINSTANCE -m -s FINANCE -t acct.taxcodes

The source table acct.taxcodes in the Finance subscription will use Mirror as the replication method in the specified CDC Replication instance.