dmsetbookmark - Set bookmark
Use this command on your CDC Replication source system to set the replication position (bookmark) in the stream of change data for a subscription.
You can obtain the replication position for a subscription with the dmshowbookmark command, which is executed on your CDC Replication target system.
Syntax
dmsetbookmark [-I <name>] -s <subscription ...> (-b <bookmark> | -f
<file>) [-a] [-L <locale>]Parameters
- [-I <name>]
- The name of the CDC Replication instance. You can set the TSINSTANCE environment variable to the name of your CDC Replication instance. After this is complete, you no longer have to specify the instance when issuing commands.
- -s <subscription ...>
- The name of the subscription for which CDC Replication sets a replication position (bookmark).
- -b <bookmark>
- Indicates the replication position (bookmark) which determines the point in the database log where you want CDC Replication to resume mirroring. When mirroring resumes, CDC Replication will start capturing change data at the indicated replication position. The replication position is a hexadecimal-encoded string that is obtained from the dmshowbookmark command.
- -f <file>
- Indicates the name of the binary or XML file that contains all replication position (bookmark) information which determines the point in the database log where you want CDC Replication to resume mirroring. When mirroring resumes, CDC Replication will start capturing change data at the replication position indicated in the file.
- [-a]
- Deprecated: Sets all tables in the subscriptions (except for parked tables) as active as of the new replication position (bookmark). If you do not specify this value, CDC Replication will use -a by default.
- [-L <locale>]
- The name of the locale used for the CDC Replication instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails
Examples
dmsetbookmark
-I MYINSTANCE -b 6578616d706c65 -s FINANCECDC Replication sets a replication position (bookmark) for the Finance subscription for the specified instance. This command specifies that mirroring will resume at the indicated replication position in the database log.
dmsetbookmark
-I MYINSTANCE -f bookmark -s FINANCECDC Replication sets
a replication position (bookmark) for the Finance subscription for
the specified instance. This command specifies that mirroring will
resume at the replication position (bookmark) contained in the bookmark file. CDC Replication will
auto-detect the XML or binary format of the file. The file is located
in CDC Replication installation
directory since no absolute path is specified.