rs_rules

Stores subscription rules. The rs_rules table has one row for each term in a subscription clause.

Column

Datatype

Description

prsid

int

Primary Replication Server for this object

subid

rs_id

ID of the subscription this rule applies to. Or, for a subscription to an article, the ID of the where clause to which this rule applies.

objid

rs_id

ID for the table or function replication definition for this subscription

dbid

int

ID for the database where the subscribed data is stored

subtype

int

Subscription type:

  • 0x01 – Range subscription

  • 0x02 – Equality subscription

  • 0x80 – Article subscription

primary_sre

int

If set, the subscription should be included in the subscription resolution engine at the primary Replication Server

replicate_sre

int

If set, the subscription should be included in the subscription resolution engine at the replicate Replication Server

colnum

smallint

The value of the base column number

valuetype

tinyint

Datatype of operand, for example, SYBCHAR

low_flag

tinyint

Bitmap for the type of the low value:

  • 0x01 – exclusive

  • 0x02 – inclusive

  • 0x04 – infinity

  • 0x08 – equality

  • 0x20 – rs_address

high_flag

tinyint

Bitmap for the type of the high value:

  • 0x01 – exclusive

  • 0x02 – inclusive

  • 0x04 – infinity

  • 0x08 – equality

  • 0x20 – rs_address

low_len

int

Length of low value

high_len

int

Length of high value

low_value

binary(255)

Binary representation of low value

high_value

binary(255)

Binary representation of high value

dtid

rs_id

ID of the declared datatype of the columns as defined in the replication definition.

Indexes

  • Unique index on (subid, colnum, primary_sre, replicate_sre, subtype)

  • Unique index on (subid, colnum)

  • Clustered index on (objid, subtype, dbid)