cdr define replicateset

The cdr define replicateset command defines a replicate set on all the servers that are included as participants in the replicates. A replicate set is a collection of several replicates to be managed together.

Important: Enterprise Replication supports replicate sets for HCL OneDB™, Version 9.3 and later only. You cannot define or modify replicate sets to include replicates with participants that are version 9.2 and earlier. In addition, replicate sets are different from and are incompatible with replicate groups (in version 9.2 and earlier).

Syntax


1  cdr define replicateset?  %Connect Option  (1)?  %Frequency Options  (2)?   --exclusive
1   repl_set? +  replicate
1   --needRemaster= original_set derived_set
Element Purpose Restrictions Syntax
derived_set Name of a temporary replicate set to create that contains only replicates that must be remastered. The name must be unique and cannot be the same as a replicate name. Long Identifiers
original_set Name of an existing replicate set that contains replicates that must be remastered. The replicate set must exist. Long Identifiers
repl_set Name of replicate set to create. The name must be unique and cannot be the same as a replicate name. Long Identifiers
replicate Name of a replicate to be included in the replicate set. The replicate must exist. Long Identifiers

The following table describes the options to the cdr define replicateset command.

Long Form Short Form Meaning
--exclusive -X Creates an exclusive replicate set. Replicates that belong to this replicate set cannot belong to any other replicate sets.
--needRemaster= -n Creates a derived replicate set that contains replicates that have schema changes and must be remastered, and any classic replicates. All classic replicates are converted to master replicates regardless of whether they have schema changes.

Usage

All servers that are specified as participants for all the specified replicates must be online and the cdr utility must be able to connect to each participant.

If you run this command as a DBSA instead of as user informix, you must have INSERT, UPDATE, and DELETE permission on the replicated tables on all the replication servers in the domain.

Any valid replicate can be defined as part of a replicate set. A replicate can belong to more than one non-exclusive replicate set, but to only one exclusive replicate set.

When you create an exclusive replicate set, the state is initially set to active.

To create an exclusive replicate set and make it active

  1. Create an empty replicate set.
  2. Stop the replicate set.
  3. Add replicates to the replicate set.
  4. Set the state of the replicate set to active by running cdr start replicateset.

Because individual replicates in a non-exclusive replicate set can have different states, the non-exclusive replicate set itself has no state. You cannot change whether a replicate set is exclusive or not.

If you change the schema of multiple replicated tables for replicates that belong to the same replicate set, you can create a derived replicate set so that you can remaster all the replicates with one command. Use the --needRemaster option to specify the existing replicate set and the name of the derived replicate set. Then run the cdr remaster replicateset command.

You can run this command from within an SQL statement by using the SQL administration API.

Example: Define a non-exclusive replicate set

The following command connects to the default server and defines the non-exclusive replicate set accounts_set with replicates repl1, repl2, and repl3:
cdr def replset accounts_set repl1 repl2 repl3

Example: Define an exclusive replicate set

The following command connects to the server olive and defines the exclusive replicate set market_set with replicates basil and thyme:
cdr def replset --connect=olive --exclusive market_set basil thyme

Example: Define a derived replicate set

The following command defines a derived replicate set named derived_accounts that is based on the replicate set accounts_set:

cdr define replicateset --needRemaster=accounts_set derived_accounts