December 9, 2009 at 6:56 am
Looking in the MSsubscriptions system table i notice there is a subscriber_id. Where is this id coming from? Is there a table who holds a distinct list of the subscriber's? If so i can't find it. If it doesn't exist can someone please in the simplest terms explain why?
CREATE TABLE [dbo].[MSsubscriptions](
[publisher_database_id] [int] NOT NULL,
[publisher_id] [smallint] NOT NULL,
[publisher_db] [sysname] NOT NULL,
[publication_id] [int] NOT NULL,
[article_id] [int] NOT NULL,
[subscriber_id] [smallint] NOT NULL,
[subscriber_db] [sysname] NOT NULL,
[subscription_type] [int] NOT NULL,
[sync_type] [tinyint] NOT NULL,
[status] [tinyint] NOT NULL,
[subscription_seqno] [varbinary](16) NOT NULL,
[snapshot_seqno_flag] [bit] NOT NULL,
[independent_agent] [bit] NOT NULL,
[subscription_time] [datetime] NOT NULL,
[loopback_detection] [bit] NOT NULL,
[agent_id] [int] NOT NULL,
[update_mode] [tinyint] NOT NULL,
[publisher_seqno] [varbinary](16) NOT NULL,
[ss_cplt_seqno] [varbinary](16) NOT NULL,
[nosync_type] [tinyint] NOT NULL
) ON [PRIMARY]
December 15, 2009 at 12:07 pm
i found where it is being defined.
it appears the subscriber_id is coming from the srvid in the master.dbo.sysservers table
March 12, 2020 at 9:45 am
Nope it is table [dbo].[MSreplservers] in distribution database. It can be misleading as sometimes server_id from [sys].[servers] can be the same as srvid [dbo].[MSreplservers]. Check how MS is doing queries in distribution database procedure [sys].[sp_MSrepl_enumsubscriptions] .
S pozdravom/Best regards
Tomáš Rybnický
web: www.wetory.eu
email: tomas.rybnicky@wetory.eu
tel.: +420724378621
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply