Just a learner
Just a learner

Reputation: 28632

How to determine the SQL Server replication type by TSQL?

I want to know how to determine the SQL Server replication type by TSQL. For example, transactional replication, transactional replication with queued update, merge replication etc. Thanks.

Upvotes: 2

Views: 7065

Answers (2)

Pete Carter
Pete Carter

Reputation: 2731

Run the following query on the distribution database:

SELECT 
     P.Publication
    ,P.Publication_type
    ,S.Subscriber_ID
    ,S.Update_Mode
FROM MSPublications P
INNER JOIN MSSubscriptions S
    ON P.Publication_ID = S.Publication_ID

Publication_type - 0=Transactional, 1=Snapshot, 2=Merge

Update_mode - 0=Read only, 1=Immediate update, 2=queued update with message queue, 3=Immediate update with queued update as failover using message queue, 4=Queued update with SQL Server queue, 5=Immediate update with queued update as failover using SQL Server queue

Upvotes: 4

LearningToCode
LearningToCode

Reputation: 53

Here is a link to the Microsoft BOL page with the update_mode decoded: http://msdn.microsoft.com/en-us/library/ms186785.aspx

Upvotes: 0

Related Questions