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.

CAUTION:
Improper use of this command can result in data loss or data duplication. You should only execute this command when directed by IBM Technical Support.

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.
You can specify an absolute path for the location of the file. If you do not specify an absolute path, you must place the file in the CDC Replication installation directory. CDC Replication will auto-detect the binary or XML format of the file.
Note: If your source database is DB2® for LUW and is configured for DPF, you can generate the XML file used by this parameter by using the dmshowbookmark command on your CDC Replication target with the -x parameter.
[-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 FINANCE

CDC 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 FINANCE

CDC 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.