cdr start replicate
The cdr start replicate command starts the capture and transmittal of replication transactions.
Syntax
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 in an Enterprise Replication domain. | |
repl_name | Name of the replicate to start. | The replicate must exist. | Long Identifiers |
server_group | Name of database server groups on which to start the replicate. | The database server must be in an Enterprise Replication domain. | |
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 replicate 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):
|
--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 replicate command causes the replicate 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 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 no server is specified, the repl_name starts on all servers that are included in the replicate. A replicate can have both active and inactive participants. When at least one participant is active, the replicate is active, however, replication does not start until at least two participants are active. You cannot start replicates that have no participants.
If a replicate belongs to an exclusive replicate set, you cannot run cdr start replicate to start that individual replicate. You must use cdr start replicateset to start all replicates in the exclusive replicate set.
Because Enterprise Replication does not process log records that were produced before the cdr start replicate command was run, transactions that occur during this period might be partially replicated. To avoid problems, either issue the cdr start replicate command on an idle system (no transactions are occurring) or use the BEGIN WORK WITHOUT REPLICATION statement until after you successfully start the replicate.
You can run the cdr check queue --qname=cntrlq command to wait for the cdr start replicate command to be applied at all Enterprise Replication servers before running the data synchronization task.
When you run the cdr start replicate command, an event alarm with a class ID of 59 is generated, if that event alarm is enabled.
Examples
cdr sta rep accounts g_svr1 g_svr2
The following example starts the replicate named accounts on the server g_svr1 with g_svr2 as the source server:
cdr start replicate accounts g_svr1 --syncdatasource=g_svr2\
--foreground --memadjust=50M
The second line indicates that the synchronization happens in the foreground and the size of the send queue is 50 MB.