dmstartmirror - Start mirroring
Issue this command from your CDC Replication 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.
-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.
-nparameter- When specified without
–tor–p, this parameter ends replication at the current time in the source database log. -tparameter- When specified with
–n, this parameter ends replication at a user-specified date and time. -pparameter- When specified with
–n, this parameter ends replication at a user-specified log position.
These user specified end points ensure that your target database is in a known state when replication ends.
You can also start and end replication in Management Console. For more information, see Starting and ending replication.
Syntax
dmstartmirror [-I <name>] [-c|-n [-t <timestamp>|-p
<log position>] [-w|-nw]] -A|-s <subscription ...> [-L <locale>]Parameters
- [-I <name>]
- Specifies the CDC Replication instance for which you want to start mirroring. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
- [-c]
- Specifies that CDC Replication will start Continuous mirroring on the specified subscriptions.
- [-n]
- Specifies that CDC Replication 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. The source system time when replication will end is set when you issue this command.
- [-t <timestamp>]
- 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
- [-p <log position>]
- Indicates that CDC Replication will
end replication at the specified Informix® LSN
in your source database log when using
-se. Here is an example of an LSN format for Informix Dynamic Server:33500745064472This parameter is optional when you specify –n.
- [-w]
- Indicates that this command will wait for replication to end when
you use –n.
–wis the default setting for a Scheduled End to replication. - [-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.
- -A
- Indicates that CDC Replication starts mirroring for all subscriptions.
- -s <subscription ...>
- Indicates the subscriptions where CDC Replication will
start mirroring. To specify multiple subscriptions, list the subscriptions
separated by a space. For example:
Subscription1 Subscription2 Subscription3 - [-L <locale>]
- The name of the locale used for the CDC Replication instance. The default is the locale of the machine where CDC Replication 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 FINANCECDC Replication starts continuous mirroring for the FINANCE subscription.
dmstartmirror
-I MYINSTANCE –n –p 000000FB:000001A4:0001
–nw
–ACDC Replication starts mirroring with the Scheduled End option for all subscriptions in the specified instance. Replication will end at the specified Microsoft SQL Server LSN in the source database log. The command will not wait for Scheduled End processing to complete.
dmstartmirror -I MYINSTANCE –n –t 2010-02-05-00-00
FINANCE
-nwCDC Replication 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.