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.

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

Create an empty replicate set.

Stop the replicate set.

Add replicates to the replicate set.

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: