The CDC_REC_UPDBEF record

Provides the image of a row before an UPDATE operation.

The CDC_REC_UPDBEF record consists of these fields:
  • The common header.
  • The record-specific header.
  • Fields listing the size of each variable-length column in the row, if any.
  • Column data for each fixed-length column, if any.
  • Column data for each variable-length column, if any.

The value in the header size field in the common header represents the number of bytes occupied by the combination of the common header, the record-specific header, and the fields listing the size of variable-length columns.

The value in the payload size field in the common header represents the number of bytes of the column data for both fixed-length and variable length columns.

The record-specific header

The header specific to the CDC_REC_UPDBEF record follows the common header.
Table 1. The CDC_REC_UPDBEF record header
Section Size Description
Sequence number 8 bytes The sequence number associated with the UPDATE operation.
Transaction ID 4 bytes The transaction ID.
User data 4 bytes The table identifier passed to the cdc_startcapture() function and stored in the syscdtabs table.
Flags 4 bytes Reserved.

Variable-length column size fields

If there are variable-length columns in the row being updated, a 4–byte field for each of those columns appears containing the column size. The order of the column size fields is the same as the order of the columns in the CDC_REC_TABSCHEMA record.

Fixed-length column data

The data from the fixed-length columns, if any, appears in the order that the corresponding columns are listed in the CDC_REC_TABSCHEMA record.

Variable-length column data

The data from the variable-length columns, if any, appears in the order that the corresponding columns are listed in the CDC_REC_TABSCHEMA record.