Replication information

Query to get list of articles | Pls use Independent tables instead of using whole query.


 SELECT DISTINCT sa.name AS articlename
,sp.publisher AS publisherserver
,sp.publisher_db AS publisherdb
,sp.name AS publicationname
,ss.subscriber_server AS subscriberservername
FROM dbo.sysmergearticles sa
JOIN dbo.sysmergepublications sp ON sa.pubid = sp.pubid
JOIN dbo.sysmergesubscriptions ss ON ss.pubid = sa.pubid
ORDER BY subscriberservername


  • Replication configuration information:


USE Distribution
GO

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

-- Get the publication name based on article 
SELECT DISTINCT srv.srvname publication_server
,a.publisher_db
,p.publication publication_name
,a.article
,a.destination_object
,ss.srvname subscription_server
,s.subscriber_db
,da.name AS distribution_agent_job_name
FROM MSArticles a
JOIN MSpublications p ON a.publication_id = p.publication_id
JOIN MSsubscriptions s ON p.publication_id = s.publication_id
JOIN master..sysservers ss ON s.subscriber_id = ss.srvid
JOIN master..sysservers srv ON srv.srvid = p.publisher_id
JOIN MSdistribution_agents da ON da.publisher_id = p.publisher_id
AND da.subscriber_id = s.subscriber_id
ORDER BY 1
,2
,3


Happy learning
Labels:

Post a Comment

Post a Comment

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Author Name

Contact Form

Name

Email *

Message *

Powered by Blogger.