rs_subscriptions

Stores information about subscriptions, triggers, and fragments.

Column

Datatype

Description

subname

varchar(255)

Name of the subscription, trigger, or fragment.

subid

rs_id

ID for this subscription or fragment.

type

int

Object type:

  • 0x00 – Subscription

  • 0x01 – Range subscription

  • 0x02 – Equality subscription

  • 0x04 – Entire table

  • 0x08 – Subscription for publication

  • 0x40 – Database subscription

  • 0x80 – Subscription for article

objid

rs_id

ID for the table replication definition, function replication definition, article, or publication for this subscription. Or, ID for fragment, or event for this trigger.

dbid

int

ID of the database this object belongs to.

pdbid

int

For system table replication and publication or article subscriptions, the value of pdbid is the ID of the primary database for the replication definition. Otherwise, value is 0.

requestdate

datetime

Date and time the last DDL request (create, drop, alter) was entered.

pownerid

rs_id

User ID at the primary Replication Server.

rownerid

rs_id

User ID at the replicate Replication Server.

status

int

  • Byte 1 holds the replicate database materialization status:
    • 0x01 – Subscription is new

    • 0x02 – Bulk subscription is activating or atomic/non-atomic subscription has completed building materialization queue

    • 0x04 – Bulk/non-atomic subscription is active

    • 0x08 – Bulk subscription is validating or non-atomic has materialized

    • 0x10 – Subscription is valid

    • 0x40 – Subscription is valid at the standby

    • 0x40 – Subscription removed at standby

    • 0x80000000 – Database subscription is using dump marker to coordinate materialization

  • Byte 2 holds the primary database dematerialization status:
    • 0x100 – New

    • 0x0200 – Activating

    • 0x0400 – Active

    • 0x0800 – Valid

  • Byte 3 holds the replicate database dematerialization status:
    • 0x00010000 – Dematerializing at replicate

    • 0x00020000 – Removing at replicate

    • 0x00100000 – Dematerializing at primary

  • Byte 4 holds suspect or rematerialization status for a publication subscription:
    • 0x02000000 – Suspect because of switch active

    • 0x04000000 – Suspect on drop at standby

    • 0x10000000 – The article subscriptions within this publication subscription are materializing one at a time

    • 0x20000000 – In the process of creating new article subscriptions

    • 0x40000000 – include truncate table

recovering

int

Subscription recovery status:
  • 0x0 – Subscription is OK

  • 0x1 – Recovering

  • 0x2 – Pending

error_flag

int

If set, subscription is unrecoverable

materializing

int

If set, subscription is materializing

dematerializing

int

If set, subscription is dematerializing

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

materialization_try

int

Number of times this atomic materialization has been tried

method

int

Method for materializing the subscription:

  • 0x00 – Default method

  • 0x01 – Atomic

  • 0x02 – Bulk

  • 0x04 – Suspend

  • 0x08 – Incremental

  • 0x10 – Non-atomic

  • 0x80 – Bulk materialization with suspended standby DSI

Note: For function replication definitions, this column is always set to 0x02 (bulk)

generation

binary

Generation number for the origin queue ID of the materialization queue

parentid

rs_id

ID for the subscription for a publication if the current subscription is for an article.

security

int

Security settings:

  • 0x001 – unified_login is “required”

  • 0x002 – mutual_auth is “required”

  • 0x004 – msg_confidentiality is “required”

  • 0x08 – msg_integrity is “required”

  • 0x10 – msg_origin_check is “required”

  • 0x20 – msg_reply_detection is “required”

  • 0x40 – msg_sequence_check is “required”

Default: 0

mechanism

char(30)

Name of security mechanism

Default: NULL

Indexes

  • Unique clustered index on (subid)

  • Unique index on (objid, dbid, subname)

  • Unique index on (subid, recovering, error_flag, materializing, dematerializing, primary_sre, replicate_sre)

  • Unique index on (subid, status)

  • Unique index on (objid)

  • Unique index on (pdbid)