Skip to content

RRN and ROWID columns

A Db2 for i table has a relative record number (RRN) for each row, and an Oracle table a ROWID. The Replicator Service can add it as a destination column and use it as the key for tracking changes.

Source Column added Destination type
Db2 for i RRN (rrnName) BIGINT, or DECIMAL(15,0) if the destination has no BIGINT
Oracle ROWID (rowidName) CHAR(18), or the first other character type available. To SQL Server, with a case-sensitive collation (Latin1_General_CS_AS).
Db2 for LUW (snapshot only) RRN (rrnName): the row's RID() BIGINT, or DECIMAL(15,0)
Informix (snapshot only) ROWID (rowidName) BIGINT, or DECIMAL(15,0)
PostgreSQL (snapshot only) RRN (rrnName): the row's ctid as text VARCHAR(32), or another character type

The column's derivation is the macro @RRN, resolved for the subscription's own source table at run time (for example RRN(schema.table) on Db2 for i), so the column stays right when a subscription is exported and imported under other names. The Capture Agent stages only Db2 for i and Oracle row identifiers, so only they can key an incremental subscription. The Db2 for LUW and PostgreSQL values change when the table is reorganized or the row is updated.

The column is added:

  • when Force hidden column is ticked on the Columns tab, or, for a member of a group, on the group;
  • for an incremental subscription whose source table has no primary key or unique index.

The column is created NOT NULL and marked as the key. The name ROWID is reserved in Oracle: set rowidName to another name before creating subscriptions from Oracle to Oracle.