cdr start replicateset

The cdr start replicateset command starts the capture and transmittal of replication transactions for all the replicates in a replicate set.

Syntax


1  cdr start replicateset?  %Connect Option  (1)  repl_set? +  server_group?   --syncdatasource=data_server? %Synchronization Options
Synchronization Options

1?  --extratargetrows=
2.1 delete
2.1 keep
2.1 merge?   --foreground?  --memadjust=size
2.1 K
2.1 M
Notes:
Element Purpose Restrictions Syntax
data_server The database server from which the data is copied to all other database servers listed. The database server must be defined in Enterprise Replication.
repl_set Name of replicate set to start. The replicate set must exist. Long Identifiers
server_group Names of database server groups on which to start the replicate set. The database server groups must be defined for Enterprise Replication.
sizeK or sizeM Size, in either kilobytes (K) or megabytes (M), of the send queue during synchronization. Must be a positive integer and must not be greater than the amount of available memory.

The following table describes the cdr start replicateset options.

Long Form Short Form Meaning
--extratargetrows= -e Specifies how to handle rows found on the target servers that are not present on the data source server from which the data is being copied (data_server):
  • delete: (default) remove rows and dependent rows, based on referential integrity constraints, from the target servers
  • keep: retain rows on the target servers
  • merge: retain rows on the target servers and replicate them to the data source server
This option applies to the initial data synchronization operation only; it does not affect the behavior of the replicate.
--foreground -F Specifies that the synchronization operation is performed as a foreground process
--memadjust= -J Increases the size of the send queue during synchronization to the number of kilobytes or megabytes specified by the size element
--syncdatasource= -S Specifies the name of the database server to use as the reference copy of the data. This server is started even if it is not listed as one of the servers to start.

Usage

The cdr start replicateset command causes the replicates defined in the specified replicate set to enter the active state (capture-send) on the specified database servers and the source database server specified by the --syncdatasource option.

If you are running this command with the --syncdatasource option as a DBSA, you must have certain permissions granted to you on several system tables in the syscdr database. For more information, see Preparing for Role Separation (UNIX).

If you would like the synchronization operation to be run as in the foreground, use the --foreground option.

The size of the send queue is specified by the value of the CDR_QUEUEMEM configuration parameter. You can increase the amount of memory that the send queue can use during this synchronization operation by using the --memadjust option to specify the size of the send queue.

If the server_group list is omitted, the replicate set repl_set enters the active state for all database servers participating in the replicate set.

Because Enterprise Replication does not process log records that were produced before the cdr start replicateset command took place, transactions that occur during this period might be partially replicated. To avoid problems, either issue the cdr start replicateset command on an idle system (no transactions are occurring) or use the BEGIN WORK WITHOUT REPLICATION statement until after you successfully start the replicates in the replicate set.

If not all the replicates in a non-exclusive replicate set are inactive, the cdr start replicateset command displays a warning and only starts the replicates that are currently inactive.

When you run the cdr start replicateset command, an event alarm with a class ID of 60 is generated, if that event alarm is enabled.

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

Examples

The following example connects to the default database server specified by the ONEDB_SERVER environment variable and starts the replicate set accounts_set on the server groups g_hill and g_lake:
cdr sta replset accounts_set g_hill g_lake

The following example starts the replicate set accounts_set on the server g_hill with g_lake as the source server:

cdr start replicateset accounts_set g_hill --syncdatasource=g_lake\ 
--foreground --memadjust=50M

The second line indicates that the synchronization happens in the foreground and the size of the send queue is 50 MB.