Origin queue ID

The origin queue ID is a unique 32-byte binary string that increases in value as each new log record is transferred. The value must increase, because Replication Server ignores records with an ID lower than the highest ID stored in the inbound queue.

When the Replication Server is restarted, it must be able to map the origin queue ID to the original log record so that it can send the next log record with an increased ID value.

Table 5-2 shows the format of the origin queue ID generated by the Adaptive Server RepAgent. A Replication Agent for a different data server can generate origin queue IDs in any format as long as the value increases and can be used to find the original log record. See the Replication Server Heterogeneous Replication Guide and Replication Server Options documentation for replication agent information for non-ASE actively supported data servers.

Table 5-2: Format of the origin queue ID for Adaptive Server RepAgent

Bytes

Contents

1–2

Database generation number used for recovering after reloading coordinated dumps.

3–8

Log page timestamp for the current record.

9–14

Row ID of the current row. Row ID = page number (4 bytes) + row number (2 bytes).

15–20

Row ID of the begin record for the oldest open transaction.

21–28

Date and time of the begin record for the oldest open transaction.

29–30

An extension used by the RepAgent to roll back orphan transactions.

31–32

Unused.

Bytes 21–28 contain an 8-byte datetime datatype value that is the time of the oldest partially transferred transaction in the database log. Replication Server prints the date and time in this field in a message that helps the Database Administrator locate the offline dumps needed for recovery. If you do not store a valid date in this field, the date and time printed in the message are meaningless. However, the message also contains the entire origin queue ID printed in hexadecimal, so if you put the date and time in a location other than bytes 21–28, the replication system administrator can extract it from the origin queue ID.