Universal Cache User Guide : IBM InfoSphere CDC for solidDB® reference : Controlling replication commands : dmstartmirror: Start mirroring
  
dmstartmirror: Start mirroring
Issue this command from your IBM InfoSphere CDC source to start mirroring on the specified subscriptions. This command starts mirroring for any table with a replication method of Mirror and a status of Refresh or Active. Tables with a replication method of Mirror and a status of Refresh are refreshed before mirroring begins.
IBM InfoSphere CDC provides two types of mirroring for source tables that are mapped to target tables: Continuous (-c parameter) and Scheduled End (Net Change) (-n parameter). The type of mirroring you select depends on your business needs.
As its name implies, Continuous mirroring replicates changes to the target on a continuous basis. Use this type of mirroring when business requirements dictate that you need replication to be running continuously and you do not have a clearly defined reason to end replication at the present time.
Scheduled End (Net Change) mirroring replicates changes (to the target) up to a user-specified point in the source database log and then ends replication. Use this type of mirroring when business requirements dictate that you only replicate your data periodically and you have a clearly defined end point for the state of your target database when replication ends.
Scheduled End (Net Change) mirroring allows you to end replication at the following points in your source database log:
-n parameter — When specified without –t, this parameter ends replication at the current time in the source database log.
-t parameter — When specified with –n, this parameter ends replication at a user-specified date and time.
These user specified end points ensure that your target database is in a known state when replication ends.
Syntax
dmstartmirror [-I <INSTANCE_NAME>] [-c|-n [-t <date and time>]
    [-w|-nw]] <-A|-s <SUBSCRIPTION NAME ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME>
Specifies the IBM InfoSphere CDC instance for which you want to start mirroring. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-c
Specifies that IBM InfoSphere CDC will start Continuous mirroring on the specified subscriptions.
If you do not specify –c or -n, IBM InfoSphere CDC will start Continuous mirroring by default on the specified subscriptions.
-n
Specifies that IBM InfoSphere CDC mirrors all committed database changes in the source database and then ends replication normally at the current source system time in the database log with the Scheduled End option.
-t <date and time>
Indicates the date and time in the source database log when replication will end when using –n.
When specifying a value for this parameter, use the following format:
“yyyy-MM-dd HH:mm”
This parameter is optional when you specify –n.
-w
Indicates that this command will wait for replication to end when you use –n. ‑w is the default setting for a Scheduled End to replication.
If you are scripting the command with this parameter, your script must wait for -n processing to complete before it continues to execute.
This parameter does not apply if you specify –c for Continuous mirroring.
-nw
Indicates that this command will not wait for replication to end if you specify ‑n.
If you are scripting this command, this parameter allows your script to continue executing (asynchronous) if -n processing is not complete.
This parameter does not apply if you specify –c for Continuous mirroring. -A Indicates that IBM InfoSphere CDC starts mirroring for all subscriptions. Use ‑s to start mirroring for one or more subscriptions.
-s <SUBSCRIPTION NAME>
Indicates the subscriptions where IBM InfoSphere CDC will start mirroring. To specify multiple subscriptions, list the subscriptions separated by a space. For example:
Subscription1 Subscription2 Subscription3
You must specify a value for this parameter or use –A for all subscriptions.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is the locale of the machine where IBM InfoSphere CDC is installed.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmstartmirror -I MYINSTANCE -c -s FINANCE
IBM InfoSphere CDC starts continuous mirroring for the FINANCE subscription.
dmstartmirror -I MYINSTANCE –n –t “2010-02-05-00-00” FINANCE -nw
IBM InfoSphere CDC starts mirroring with the Scheduled End option for the FINANCE subscription in the MYINSTANCE instance. Replication will end at the specified time in the source database log. The command will exit before Scheduled End processing is complete.
See also
Controlling replication commands